actually fix pathing spinlock
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
5aa623ee4f
commit
214f9ee171
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user