actually fix pathing spinlock
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-05-31 15:18:52 -04:00
parent 5aa623ee4f
commit 214f9ee171
3 changed files with 4 additions and 2 deletions

View File

@ -2096,6 +2096,7 @@ Potential fix for macro pathing continuous loop
Unit test for generating a world
TownLayout test
Macro pathing test
Actually fix pathing spinlock

View File

@ -84,7 +84,8 @@ public class MacroPathfindingNode implements AITreeNode {
throw new Error("Unsupported target type " + targetRaw);
}
Realm realm = Globals.serverState.realmManager.getEntityRealm(entity);
MacroPathNode targetMacro = realm.getMacroData().getPathCache().getPathingNode(((MacroAreaObject)targetRaw).getPos());
Vector3d targetPos = ((MacroAreaObject)targetRaw).getPos();
MacroPathNode targetMacro = realm.getMacroData().getPathCache().getPathingNode(targetPos);
//
@ -94,6 +95,7 @@ public class MacroPathfindingNode implements AITreeNode {
//
//Queue the pathfinding operation
PathingProgressiveData pathingProgressiveData = Globals.serverState.macroPathingService.queuePathfinding(realm, currentPos, targetMacro);
pathingProgressiveData.setGoal(targetPos);
PathfindingNode.setPathfindingData(blackboard, pathingProgressiveData);
}

View File

@ -57,7 +57,6 @@ public class MacroPathingService extends SignalServiceImpl {
try {
List<Vector3d> points = this.findPath(realm.getMacroData(), start, end);
rVal.setPoints(points);
rVal.setGoal(points.getLast());
rVal.setReady(true);
} catch(Throwable e){
e.printStackTrace();