mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10759] Correctly reset mob orientation upon reaching spawn point. Should also improve visualisation of mob orientation on clients
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
07c48c77c9
commit
ca56284912
5 changed files with 13 additions and 3 deletions
|
|
@ -72,9 +72,10 @@ HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32& time_diff
|
|||
// restore orientation of not moving creature at returning to home
|
||||
if (owner.GetDefaultMovementType() == IDLE_MOTION_TYPE)
|
||||
{
|
||||
// such a mob might need very exact spawning point, hence relocate to spawn-position
|
||||
if (CreatureData const* data = sObjectMgr.GetCreatureData(owner.GetDBTableGUIDLow()))
|
||||
{
|
||||
owner.SetOrientation(data->orientation);
|
||||
owner.Relocate(data->posX, data->posY, data->posZ, data->orientation);
|
||||
owner.SendHeartBeat(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue