Core/MovementGenerator: Fix crash in taxi paths
Port From (https://github.com/TrinityCore/TrinityCore/commit/2eea34fb47ade2ab3bf8d46d18a9880a007a2274)
This commit is contained in:
@@ -75,7 +75,7 @@ namespace Game.Movement
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint pointId = (uint)(owner.MoveSpline.CurrentPathIdx() < 0 ? 0 : owner.MoveSpline.CurrentPathIdx());
|
uint pointId = (uint)(owner.MoveSpline.CurrentPathIdx() < 0 ? 0 : owner.MoveSpline.CurrentPathIdx());
|
||||||
if (pointId > _currentNode)
|
if (pointId > _currentNode && _currentNode < _path.Count)
|
||||||
{
|
{
|
||||||
bool departureEvent = true;
|
bool departureEvent = true;
|
||||||
do
|
do
|
||||||
@@ -92,7 +92,7 @@ namespace Game.Movement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pointId == _currentNode)
|
if (pointId >= _currentNode)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (_currentNode == _preloadTargetNode)
|
if (_currentNode == _preloadTargetNode)
|
||||||
|
|||||||
Reference in New Issue
Block a user