aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-26 12:28:48 -0700
committermaximius <none@none>2009-09-26 12:28:48 -0700
commit59586af421a82f96bb5af93d9ecbec2aa73c5cee (patch)
tree492c19a685b113a6cd514c48d2a5b9c55cc0c36f
parentff9a2f6ba1a4f0eb3fdd84ae15daf92e72403b92 (diff)
*More logical to cause the damage -after- the fall, not before, lol.
--HG-- branch : trunk
-rw-r--r--src/game/Player.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index d901ac45476..5ce152cd588 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -4461,15 +4461,16 @@ bool Player::FallGround(uint8 FallMode)
if ((z_diff = fabs(ground_Z - z)) < 0.1f)
return false;
+ GetMotionMaster()->MoveFall(ground_Z, EVENT_FALL_GROUND);
+
// Below formula for falling damage is from Player::HandleFall
if(FallMode == 2 && z_diff >= 14.57f)
{
uint32 damage = std::min(GetMaxHealth(), (uint32)((0.018f*z_diff-0.2426f)*GetMaxHealth()*sWorld.getRate(RATE_DAMAGE_FALL)));
if(damage > 0) EnvironmentalDamage(DAMAGE_FALL, damage);
}
-
- GetMotionMaster()->MoveFall(ground_Z, EVENT_FALL_GROUND);
- if(FallMode == 0) Unit::setDeathState(DEAD_FALLING);
+ else if(FallMode == 0)
+ Unit::setDeathState(DEAD_FALLING);
return true;
}