diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/TemporarySummon.h | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 9 | ||||
-rw-r--r-- | src/game/Unit.h | 2 |
3 files changed, 2 insertions, 11 deletions
diff --git a/src/game/TemporarySummon.h b/src/game/TemporarySummon.h index dc721bac25d..aa4650a02c9 100644 --- a/src/game/TemporarySummon.h +++ b/src/game/TemporarySummon.h @@ -54,7 +54,7 @@ class Minion : public TempSummon void InitSummon(); void RemoveFromWorld(); Unit *GetOwner() { return m_owner; } - float GetFollowAngle() { return m_followAngle; } + float GetFollowAngle() const { return m_followAngle; } void SetFollowAngle(float angle) { m_followAngle = angle; } bool IsPetGhoul() const {return GetEntry() == 26125;} // Ghoul may be guardian or pet protected: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 5f651fcd015..308d510e5ae 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -14906,15 +14906,6 @@ void Unit::SetFlying(bool apply) } } -float Unit::GetFollowAngle() const -{ - if (GetTypeId()!=TYPEID_UNIT) - return PET_FOLLOW_ANGLE; - if (!((Creature*)this)->HasSummonMask(SUMMON_MASK_MINION)) - return PET_FOLLOW_ANGLE; - return ((Minion*)this)->GetFollowAngle(); -} - void Unit::NearTeleportTo( float x, float y, float z, float orientation, bool casting /*= false*/ ) { if(GetTypeId() == TYPEID_PLAYER) diff --git a/src/game/Unit.h b/src/game/Unit.h index 9be220e03b1..6d8f8838cf3 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1805,7 +1805,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject bool canFly() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLY_MODE); } bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING); } void SetFlying(bool apply); - float GetFollowAngle() const; + virtual float GetFollowAngle() const { return M_PI/2; } protected: explicit Unit (); |