diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2011-06-26 21:36:20 +0200 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2011-06-26 21:36:20 +0200 |
commit | 6ce529aff3250a80cb0b2f935a181aa61ae62f7f (patch) | |
tree | d9fdcfd7d1b1771629ece2ea69ed97461a187bb4 | |
parent | ad81d4132c7df0741c6396697cfb32e0f1c3706c (diff) |
Core/Entities: Add MOVEMENTFLAG_ROOT to unit on Unit::SetStunned, and remove any other conflicting movement flags that might freeze clients.
This *properly* fixes the ancient root freeze issue that surfaced during the early stages of 3.x
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index dedfb4b28d1..a716748d5f6 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -15620,7 +15620,10 @@ void Unit::SetStunned(bool apply) SetUInt64Value(UNIT_FIELD_TARGET, 0); SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); -// AddUnitMovementFlag(MOVEMENTFLAG_ROOT); + // MOVEMENTFLAG_ROOT cannot be used in conjunction with ie. MOVEMENTFLAG_FORWARD, + // this will freeze clients. That's why we remove any current movement flags before + // setting MOVEMENTFLAG_ROOT + SetUnitMovementFlags(MOVEMENTFLAG_ROOT); // Creature specific if (GetTypeId() != TYPEID_PLAYER) @@ -15652,7 +15655,7 @@ void Unit::SetStunned(bool apply) data << uint32(0); SendMessageToSet(&data, true); -// RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT); + RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT); } } } |