Fixed crashes and errors when loading into world.

This commit is contained in:
hondacrx
2022-06-21 14:56:22 -04:00
parent be8e18450e
commit 63cbd18350
12 changed files with 79 additions and 31 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ namespace Game.AI
SmartEscortState _escortState;
uint _escortNPCFlags;
uint _escortInvokerCheckTimer;
WaypointPath _path;
WaypointPath _path = new();
uint _currentWaypointNode;
bool _waypointReached;
uint _waypointPauseTimer;
@@ -132,7 +132,6 @@ namespace Game.AI
return false;
}
_path = new WaypointPath();
_path.id = path.id;
_path.nodes.AddRange(path.nodes);
foreach (WaypointNode waypoint in _path.nodes)
@@ -802,6 +801,7 @@ namespace Game.AI
{
me.SetWalk(!run);
_run = run;
foreach (var node in _path.nodes)
node.moveType = run ? WaypointMoveType.Run : WaypointMoveType.Walk;
}