aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/Creature.cpp3
-rw-r--r--src/game/GuardAI.cpp1
-rw-r--r--src/game/IdleMovementGenerator.cpp5
-rw-r--r--src/game/IdleMovementGenerator.h2
-rw-r--r--src/game/PetAI.cpp1
-rw-r--r--src/game/PetHandler.cpp1
-rw-r--r--src/game/Unit.cpp2
7 files changed, 6 insertions, 9 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index ed2f3f2ee54..df56a3ac27f 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1620,9 +1620,6 @@ void Creature::setDeathState(DeathState s)
if (canFly() && FallGround())
return;
-
- if(!IsStopped())
- StopMoving();
}
Unit::setDeathState(s);
diff --git a/src/game/GuardAI.cpp b/src/game/GuardAI.cpp
index 0a892961f4d..07a5bd9f819 100644
--- a/src/game/GuardAI.cpp
+++ b/src/game/GuardAI.cpp
@@ -62,7 +62,6 @@ void GuardAI::EnterEvadeMode()
if( !i_creature.isAlive() )
{
DEBUG_LOG("Creature stopped attacking because he's dead [guid=%u]", i_creature.GetGUIDLow());
- i_creature.StopMoving();
i_creature.GetMotionMaster()->MoveIdle();
i_state = STATE_NORMAL;
diff --git a/src/game/IdleMovementGenerator.cpp b/src/game/IdleMovementGenerator.cpp
index ff21643c2b0..c6598409b44 100644
--- a/src/game/IdleMovementGenerator.cpp
+++ b/src/game/IdleMovementGenerator.cpp
@@ -23,6 +23,11 @@
IdleMovementGenerator si_idleMovement;
+void IdleMovementGenerator::Initialize(Unit &owner)
+{
+ owner.StopMoving();
+}
+
void
IdleMovementGenerator::Reset(Unit& /*owner*/)
{
diff --git a/src/game/IdleMovementGenerator.h b/src/game/IdleMovementGenerator.h
index 3719f7bc7d7..ac5a4da529c 100644
--- a/src/game/IdleMovementGenerator.h
+++ b/src/game/IdleMovementGenerator.h
@@ -27,7 +27,7 @@ class TRINITY_DLL_SPEC IdleMovementGenerator : public MovementGenerator
{
public:
- void Initialize(Unit &) { }
+ void Initialize(Unit &);
void Finalize(Unit &) { }
void Reset(Unit &);
bool Update(Unit &, const uint32 &) { return true; }
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp
index 72c8c1e760b..ad11a49c07d 100644
--- a/src/game/PetAI.cpp
+++ b/src/game/PetAI.cpp
@@ -63,7 +63,6 @@ void PetAI::_stopAttack()
if( !i_pet.isAlive() )
{
DEBUG_LOG("Creature stoped attacking cuz his dead [guid=%u]", i_pet.GetGUIDLow());
- i_pet.StopMoving();
i_pet.GetMotionMaster()->Clear();
i_pet.GetMotionMaster()->MoveIdle();
i_pet.CombatStop();
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index 49a3bb95cb7..456d68ed54d 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -87,7 +87,6 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
case COMMAND_STAY: //flat=1792 //STAY
pet->AttackStop();
pet->InterruptNonMeleeSpells(false);
- pet->StopMoving();
pet->GetMotionMaster()->MoveIdle();
charmInfo->SetCommandState( COMMAND_STAY );
break;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e3e11c2e840..d8c4d3bb16a 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10394,7 +10394,6 @@ void Unit::setDeathState(DeathState s)
ClearDiminishings();
GetMotionMaster()->Clear(false);
GetMotionMaster()->MoveIdle();
- StopMoving();
//without this when removing IncreaseMaxHealth aura player may stuck with 1 hp
//do not why since in IncreaseMaxHealth currenthealth is checked
SetHealth(0);
@@ -13138,7 +13137,6 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess)
if(GetTypeId() == TYPEID_UNIT)
{
((Creature*)this)->AI()->OnCharmed(true);
- StopMoving();
GetMotionMaster()->Clear(false);
GetMotionMaster()->MoveIdle();
}