[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:
Schmoozerd 2010-11-20 19:38:02 +02:00 committed by Ambal
parent 07c48c77c9
commit ca56284912
5 changed files with 13 additions and 3 deletions

View file

@ -1158,6 +1158,14 @@ void WorldObject::Relocate(float x, float y, float z)
((Unit*)this)->m_movementInfo.ChangePosition(x, y, z, GetOrientation());
}
void WorldObject::SetOrientation(float orientation)
{
m_orientation = orientation;
if(isType(TYPEMASK_UNIT))
((Unit*)this)->m_movementInfo.ChangeOrientation(orientation);
}
uint32 WorldObject::GetZoneId() const
{
return GetTerrain()->GetZoneId(m_positionX, m_positionY, m_positionZ);