This commit is contained in:
Your Name 2020-08-30 15:51:26 -06:00
parent 49e644d780
commit 496cba943f

View File

@ -2231,10 +2231,11 @@ doWalk(goal, dist, isScriptGoal)
self endon("goal_internal");//so that the watchOnGoal notify can happen same frame, not a frame later self endon("goal_internal");//so that the watchOnGoal notify can happen same frame, not a frame later
distsq = dist*dist; distsq = dist*dist;
self thread killWalkOnEvents();
self thread watchOnGoal(goal, distsq);
if (isScriptGoal) if (isScriptGoal)
self thread doWalkScriptNotify(); self thread doWalkScriptNotify();
self thread killWalkOnEvents();
self thread watchOnGoal(goal, distsq);
current = self initAStar(goal); current = self initAStar(goal);
while(current >= 0) while(current >= 0)