mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Fixed a potential crash when resuming a SplineChainMovementGenerator.
(cherry picked from commit e5301e2c98)
This commit is contained in:
@@ -71,7 +71,9 @@ void SplineChainMovementGenerator::Initialize(Unit* me)
|
||||
SendPathSpline(me, partial);
|
||||
TC_LOG_DEBUG("movement.splinechain", "%s: Resumed spline chain generator from resume state.", me->GetGUID().ToString().c_str());
|
||||
++_nextIndex;
|
||||
if (!_msToNext)
|
||||
if (_nextIndex >= _chainSize)
|
||||
_msToNext = 0;
|
||||
else if (!_msToNext)
|
||||
_msToNext = 1;
|
||||
_nextFirstWP = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user