diff options
author | megamage <none@none> | 2008-12-12 18:34:51 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-12 18:34:51 -0600 |
commit | 55d9e4c01d342e40db58481f89d58ec5c3940685 (patch) | |
tree | 49f30c2b689507f9131f5b761b4f750b997b8c42 | |
parent | 42fae1a799dc17aee9fe4aa78ee4ade82eec72d5 (diff) |
*Try to fix the bug that units may be feared forever.
*Try to fix the bug that units still flee after death.
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index c8cf1239587..c7538a12774 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10176,6 +10176,8 @@ void Unit::setDeathState(DeathState s) // remove aurastates allowing special moves ClearAllReactives(); 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 @@ -12816,11 +12818,9 @@ void Unit::SetFeared(bool apply) else { RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); - GetMotionMaster()->MovementExpired(false); - if( GetTypeId() != TYPEID_PLAYER && isAlive() ) + if(isAlive()) { - // restore appropriate movement generator - if(getVictim()) + if( GetTypeId() != TYPEID_PLAYER && getVictim()) GetMotionMaster()->MoveChase(getVictim()); else GetMotionMaster()->Initialize(); |