]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Apply new logic by martin - accommodates horizontal velocity in the vertical fall...
authorMario <mario.mario@y7mail.com>
Mon, 30 Dec 2019 08:47:11 +0000 (18:47 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 30 Dec 2019 08:47:11 +0000 (18:47 +1000)
qcsrc/server/sv_main.qc

index 71e4156b4528f43c56f85fb93c3a53ad434cbd7d..ea89794357517cb79b5a83887712579e067dfc6b 100644 (file)
@@ -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))