aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-17 00:00:48 -0600
committermegamage <none@none>2009-01-17 00:00:48 -0600
commitf414ab1686c300787e3dfb0c397227062b8feea6 (patch)
tree2c76fa147dbf95b9192b01c7484d1804c03d2ed5 /src/game/Creature.cpp
parent0a1c601a1cc0e0036ad8fbfce68d87d14fa572d0 (diff)
*Update flee and confuse movement.
--HG-- branch : trunk
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 6ad520407cd..8c72efff03d 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1872,18 +1872,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
@@ -2143,7 +2135,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