aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 8745d86caa9..424c4e1eaae 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1871,18 +1871,10 @@ void Creature::DoFleeToGetAssistance(float radius) // Optional parameter
CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *(GetMap()));
- if(!GetMotionMaster()->empty() && (GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE))
- GetMotionMaster()->Clear(false);
- if(pCreature == NULL)
- {
- GetMotionMaster()->MoveIdle();
+ if(!pCreature)
GetMotionMaster()->MoveFleeing(getVictim());
- }
else
- {
- GetMotionMaster()->MoveIdle();
GetMotionMaster()->MovePoint(0,pCreature->GetPositionX(),pCreature->GetPositionY(),pCreature->GetPositionZ());
- }
}
Unit* Creature::SelectNearestTarget(float dist) const
@@ -2142,7 +2134,7 @@ bool Creature::HasSpellCooldown(uint32 spell_id) const
bool Creature::IsInEvadeMode() const
{
- return !i_motionMaster.empty() && i_motionMaster.GetCurrentMovementGeneratorType() == HOME_MOTION_TYPE;
+ return /*!i_motionMaster.empty() &&*/ i_motionMaster.GetCurrentMovementGeneratorType() == HOME_MOTION_TYPE;
}
bool Creature::HasSpell(uint32 spellID) const