Critical fix because Devin problems

This commit is contained in:
Player Name 2026-06-28 01:18:54 +02:00
parent c96673989c
commit 4eeda96ff2

View file

@ -6,13 +6,8 @@ import core.game.node.entity.player.Player;
import core.game.node.entity.skill.Skills;
import core.game.node.item.Item;
import core.game.node.item.GroundItem;
import core.game.world.map.Direction;
import core.game.world.map.Location;
import core.game.world.map.Point;
import core.game.world.map.RegionManager;
import core.game.world.update.flag.chunk.ItemUpdateFlag;
import core.game.world.map.*;
import core.tools.Log;
import core.tools.SystemLogger;
import java.util.Deque;
import java.util.ArrayDeque;
@ -247,7 +242,9 @@ public final class WalkingQueue {
if (last == null) {
last = p.getLocation();
}
if (last.getChunk() != p.getLocation().getChunk()) {
int rx = last.getRegionX(), ry = last.getRegionY();
int cx = p.getLocation().getRegionX(), cy = p.getLocation().getRegionY();
if (Math.abs(rx - cx) >= 4 || Math.abs(ry - cy) >= 4) {
p.getPlayerFlags().setUpdateSceneGraph(true);
}
}
@ -270,7 +267,9 @@ public final class WalkingQueue {
if (lastRegion == null) {
lastRegion = location;
}
if (lastRegion.getChunk() != location.getChunk()) {
int rx = lastRegion.getRegionX(), ry = lastRegion.getRegionY();
int cx = location.getRegionX(), cy = location.getRegionY();
if (Math.abs(rx - cx) >= 4 || Math.abs(ry - cy) >= 4) {
p.getPlayerFlags().setUpdateSceneGraph(true);
}
if (move && p.getPlayerFlags().isUpdateSceneGraph()) {