]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
trigger_hurt q3compat: always damage player at 20hz in "fast" mode
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 27 Dec 2022 16:07:36 +0000 (02:07 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Tue, 27 Dec 2022 16:13:01 +0000 (02:13 +1000)
Although Q3A and Q3TA damage the player at the ticrate, CPMA and DeFRaG
hard-code trigger_hurt to 20hz (matching Q3A/Q3TA default ticrate) to
make gameplay consistent across all ticrates.

On higher ticrate servers, this fixes the torches on dfwc04-3, the lava
on ct3dm5, etc.

qcsrc/common/mapobjects/trigger/hurt.qc

index 20c08feb1c052a7737eeedb602c9744c1795ad97..3ab2433ad56b6fcfdf5c5173b8a1c7b7a0eea506 100644 (file)
@@ -23,7 +23,7 @@ void trigger_hurt_touch(entity this, entity toucher)
        // only do the EXACTTRIGGER_TOUCH checks when really needed (saves some cpu)
        if (toucher.iscreature)
        {
-               if (time >= toucher.triggerhurttime + ((q3compat && !(this.spawnflags & HURT_SLOW)) ? autocvar_sys_ticrate : 1))
+               if (time >= toucher.triggerhurttime + (q3compat && !(this.spawnflags & HURT_SLOW) ? 0.05 : 1))
                {
                        EXACTTRIGGER_TOUCH(this, toucher);
                        toucher.triggerhurttime = time;