Skip to content

Commit 96b2385

Browse files
committed
Core/Movement: Prevent immediate movement generators from fully removing other movement
1 parent 607108d commit 96b2385

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server/game/Movement/MotionMaster.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,9 @@ void MotionMaster::DirectAdd(MovementGenerator* movement, MovementSlot slot/* =
11691169
auto where = _generators.lower_bound(movement);
11701170
if (!_generators.empty())
11711171
{
1172-
bool replacesExisting = where != _generators.end() && !_generators.key_comp()(movement, *where);
1172+
bool replacesExisting = !movement->HasFlag(MOVEMENTGENERATOR_FLAG_IMMEDIATE)
1173+
&& where != _generators.end()
1174+
&& !_generators.key_comp()(movement, *where);
11731175
auto top = _generators.begin();
11741176
if (replacesExisting)
11751177
Remove(where, where == top, false);

0 commit comments

Comments
 (0)