From bfe055a63d4ce8577e6b86c2e9535993ae592c59 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 1 Sep 2003 05:02:20 +0000 Subject: * Realistic falling damage * Added fallDamage to class database * Added DAMAGE_NO_LOCDAMAGE dflag to avoid calculating locational damage --- src/game/bg_pmove.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/game/bg_pmove.c') diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 9e0ad62c..df2f7c7e 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -1396,11 +1396,13 @@ static void PM_CrashLand( void ) // want to take damage or play a crunch sound if( !( pml.groundTrace.surfaceFlags & SURF_NODAMAGE ) ) { - if( delta > 60 ) + pm->ps->stats[ STAT_FALLDIST ] = delta; + + if( delta > AVG_FALL_DISTANCE ) { PM_AddEvent( EV_FALL_FAR ); } - else if( delta > 40 ) + else if( delta > MIN_FALL_DISTANCE ) { // this is a pain grunt, so don't play it if dead if( pm->ps->stats[STAT_HEALTH] > 0 ) -- cgit