[11710] Don't send movements of stopped creatues

destination holder still contains info about current destination point, even when movement is disabled/stopped
as a result, creature moves somewhere on client, while stopped on server-side
This commit is contained in:
SilverIce 2011-07-04 04:38:10 +03:00
parent fce6a5b7d3
commit 984f16aedd

View file

@ -2390,7 +2390,7 @@ void Creature::SetActiveObjectState( bool on )
void Creature::SendMonsterMoveWithSpeedToCurrentDestination(Player* player) void Creature::SendMonsterMoveWithSpeedToCurrentDestination(Player* player)
{ {
float x, y, z; float x, y, z;
if(GetMotionMaster()->GetDestination(x, y, z)) if (!IsStopped() && GetMotionMaster()->GetDestination(x, y, z))
SendMonsterMoveWithSpeed(x, y, z, 0, player); SendMonsterMoveWithSpeed(x, y, z, 0, player);
} }