From 58c4e77da3d327bcd1466148992f2aa77131b605 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 30 Dec 2019 18:47:11 +1000 Subject: [PATCH] Apply new logic by martin - accommodates horizontal velocity in the vertical fall damage calculations when onlyvertical is enabled, matching regular fall damage more accurately --- qcsrc/server/sv_main.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 71e4156b4..ea8979435 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -115,7 +115,7 @@ void CreatureFrame_FallDamage(entity this) { float dm; // dm is the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage. if(autocvar_g_balance_falldamage_onlyvertical) - dm = fabs(this.oldvelocity.z) - fabs(this.velocity.z); + dm = fabs(this.oldvelocity.z) - vlen(this.velocity); else dm = vlen(this.oldvelocity) - vlen(this.velocity); if (IS_DEAD(this)) -- 2.39.2