mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Movement: Fix assertion triggered in SplineChainMovementGenerator
Fix an assertion triggered in SplineChainMovementGenerator happening when a new generator is added while last spline of the SplineChainMovementGenerator is being processed but is not finalized yet.
Fix #23077
(cherry picked from commit 5d7f0eef6e)
This commit is contained in:
@@ -89,6 +89,13 @@ void SplineChainMovementGenerator::Initialize(Unit* owner)
|
||||
return;
|
||||
}
|
||||
|
||||
if (_nextIndex >= _chainSize)
|
||||
{
|
||||
TC_LOG_WARN("movement", "SplineChainMovementGenerator::Initialize: couldn't initialize generator, _nextIndex is >= _chainSize (%s)", owner->GetGUID().ToString().c_str());
|
||||
_msToNext = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_nextFirstWP) // this is a resumed movegen that has to start with a partial spline
|
||||
{
|
||||
if (HasFlag(MOVEMENTGENERATOR_FLAG_FINALIZED))
|
||||
|
||||
Reference in New Issue
Block a user