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
This commit is contained in:
click
2010-12-22 21:31:52 +01:00
parent 0f3b9019a8
commit b1ded4bd98

View File

@@ -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()