From f414ab1686c300787e3dfb0c397227062b8feea6 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 17 Jan 2009 00:00:48 -0600 Subject: *Update flee and confuse movement. --HG-- branch : trunk --- src/game/Creature.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/game/Creature.cpp') 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 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 -- cgit v1.2.3