From: Mario Date: Mon, 30 Dec 2019 08:47:11 +0000 (+1000) Subject: Apply new logic by martin - accommodates horizontal velocity in the vertical fall... X-Git-Tag: xonotic-v0.8.5~1105^2~64 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=58c4e77da3d327bcd1466148992f2aa77131b605;p=xonotic%2Fxonotic-data.pk3dir.git Apply new logic by martin - accommodates horizontal velocity in the vertical fall damage calculations when onlyvertical is enabled, matching regular fall damage more accurately --- 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))