aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/Unit.h12
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; }