NSClientPlayer::Physics_Fall: fix falldamage
This commit is contained in:
parent
37f5c907b4
commit
4a636693bc
1 changed files with 6 additions and 0 deletions
|
@ -72,6 +72,12 @@ NSClientPlayer::Physics_Fall(float flDownforce)
|
|||
fFallDamage = (flDownforce - flFallDist) * (100 / (flMaxDist - flFallDist));
|
||||
}
|
||||
|
||||
/* this is kinda ugly, but worth the price */
|
||||
NSDict damageDecl = spawn(NSDict);
|
||||
damageDecl.AddKey("damage", ftos((int)fFallDamage));
|
||||
Damage(this, this, damageDecl, 1.0, g_vec_null, origin);
|
||||
remove(damageDecl);
|
||||
|
||||
//Damage_Apply(this, world, fFallDamage, 0, DMG_FALL | DMG_SKIP_ARMOR);
|
||||
StartSoundDef("Player.FallDamage", CHAN_VOICE, true);
|
||||
} else if (flDownforce >= PHY_FALL_DISTANCE) {
|
||||
|
|
Loading…
Reference in a new issue