mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Add function to update orientation of unit (for both server andclient). by NoFantasy
--HG-- branch : trunk
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user