diff options
author | Kudlaty <none@none> | 2009-12-05 11:12:21 +0100 |
---|---|---|
committer | Kudlaty <none@none> | 2009-12-05 11:12:21 +0100 |
commit | 7d38088860b904d53325e39a067d405143502e03 (patch) | |
tree | 12a1294a650c5cb6694120366edccd3a3bfb561a /src | |
parent | 76c57e111a803f3ac0c8871919fc824f38ab0c40 (diff) |
Add function to change orientation or set in front of some unit. It also send packet with move update, so client also will see that creature change orientation.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h index 98db6a9b5f8..91ec54d1d6a 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1622,6 +1622,18 @@ class TRINITY_DLL_SPEC Unit : public WorldObject SetOrientation(GetAngle(target)); } bool isInBackInMap(Unit const* target, float distance, float arc = M_PI) const; + void ChangeOrient(float fAngle, Unit* pUnit = NULL) + { + if(!this) + return; + + if(!pUnit) + this->SetOrientation(fAngle); + else + this->SetInFront(pUnit); + + this->SendMovementFlagUpdate(); + } // Visibility system UnitVisibility GetVisibility() const { return m_Visibility; } |