summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2009-10-08 16:14:26 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:42 +0000
commit030f30383f37f5f4e52be312b23579eeb20f1f5e (patch)
tree0a10e07646fbc9b4ae309e409a7abbebdaa5312a /src
parentb5ae598e12025ceefe0fb32d044086108470dff6 (diff)
* (bug 3345) Cap knockback damage from falling, so that humans no longer 'bounce' from large falls
Diffstat (limited to 'src')
-rw-r--r--src/game/g_combat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index adc02f7f..8b5877cf 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -939,6 +939,11 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
BG_Class( targ->client->ps.stats[ STAT_CLASS ] )->knockbackScale );
}
+ // Too much knockback from falling really far makes you "bounce" and
+ // looks silly. However, none at all also looks bad. Cap it.
+ if( mod == MOD_FALLING && knockback > 50 )
+ knockback = 50;
+
if( knockback > 200 )
knockback = 200;