diff options
author | click <none@none> | 2010-12-22 21:31:52 +0100 |
---|---|---|
committer | click <none@none> | 2010-12-22 21:31:52 +0100 |
commit | b1ded4bd98a61666fed8367ae8a16bab732cc327 (patch) | |
tree | a5af97d5937cc41fb1eabc5c0a5b1bae4b11bda6 /src | |
parent | 0f3b9019a88777bef8383e699d27a7e8615f93f2 (diff) |
Core/Unit: Check if NPC is on a transport before sending StopMoving() -packet (normally shipped when trying to speak to moving NPCs) - fixes creatures falling off boats etc.
Thanks to Socolin for hunting down and patching this annoying bug.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8da94c2d403..1d01d2d78bc 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -14481,8 +14481,9 @@ void Unit::StopMoving() //if (fabs(GetPositionZ() - z) < 2.0f) // Relocate(GetPositionX(), GetPositionY(), z); //Relocate(GetPositionX(), GetPositionY(),GetPositionZ()); - - SendMonsterStop(); + + if (!(GetUnitMovementFlags() & MOVEMENTFLAG_ONTRANSPORT)) + SendMonsterStop(); } void Unit::SendMovementFlagUpdate() |