[8623] Add function to update orientation of unit (for both server and client)

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2009-10-11 11:31:53 +02:00
parent 732bcfbbb6
commit 45a2ee21ef
4 changed files with 15 additions and 15 deletions

View file

@ -3225,6 +3225,17 @@ void Unit::SetInFront(Unit const* target)
SetOrientation(GetAngle(target));
}
void Unit::SetFacingToObject(WorldObject* pObject)
{
// update orientation at server
SetOrientation(GetAngle(pObject));
// and client
WorldPacket data;
BuildHeartBeatMsg(&data);
SendMessageToSet(&data, false);
}
bool Unit::isInAccessablePlaceFor(Creature const* c) const
{
if(IsInWater())