Add function to update orientation of unit (for both server andclient). by NoFantasy

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-19 17:48:45 +01:00
parent 2925dfcfc4
commit 57bdbdc0ca
3 changed files with 14 additions and 14 deletions

View File

@@ -3517,6 +3517,17 @@ bool Unit::isInBackInMap(Unit const* target, float distance, float arc) const
return IsWithinDistInMap(target, distance) && !HasInArc( 2 * M_PI - arc, target );
}
void Unit::SetFacingToObject(WorldObject* pObject)
{
// update orientation at server
SetOrientation(GetAngle(pObject));
// and client
WorldPacket data;
BuildHeartBeatMsg(&data);
SendMessageToSet(&data, false);
}
bool Unit::isInAccessiblePlaceFor(Creature const* c) const
{
if(IsInWater())