Created
July 10, 2011 20:05
-
-
Save SilverIce/1074905 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp | |
index e9205a5..bf282e6 100644 | |
--- a/src/game/Creature.cpp | |
+++ b/src/game/Creature.cpp | |
@@ -509,6 +509,8 @@ void Creature::Update(uint32 update_diff, uint32 diff) | |
} | |
case CORPSE: | |
{ | |
+ Unit::Update(update_diff, diff); | |
+ | |
if (m_isDeadByDefault) | |
break; | |
@@ -1492,7 +1494,7 @@ void Creature::SetDeathState(DeathState s) | |
Unit::SetDeathState(ALIVE); | |
clearUnitState(UNIT_STAT_ALL_STATE); | |
- i_motionMaster.Clear(); | |
+ i_motionMaster.Initialize(); | |
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); | |
@@ -1541,8 +1543,8 @@ bool Creature::FallGround() | |
init.Launch(); | |
// hacky solution: by some reason died creatures not updated, that's why need finalize movement state | |
- GetMap()->CreatureRelocation(this, GetPositionX(), GetPositionY(), tz, GetOrientation()); | |
- DisableSpline(); | |
+ //GetMap()->CreatureRelocation(this, GetPositionX(), GetPositionY(), tz, GetOrientation()); | |
+ //DisableSpline(); | |
return true; | |
} | |
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp | |
index 5b27d08..1f5dc6c 100644 | |
--- a/src/game/Unit.cpp | |
+++ b/src/game/Unit.cpp | |
@@ -8361,8 +8361,10 @@ void Unit::SetDeathState(DeathState s) | |
RemoveMiniPet(); | |
UnsummonAllTotems(); | |
+ i_motionMaster.Clear(false,true); | |
+ i_motionMaster.MoveIdle(); | |
StopMoving(); | |
- DisableSpline(); | |
+ //DisableSpline(); | |
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); | |
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the main thing i afraid is update spells and etc - but as i can see you already doing this and there is no problems for you
this needed to remove some hacks from our code(like died creature falling). Corpses should be able to move (but ofc they shouldn't chase you^^)
it would be nice