]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "q3compat: make trigger_hurt without spawnflags 16 deal damage every frame...
authorbones_was_here <bones_was_here@xa.org.au>
Fri, 28 Aug 2020 20:50:01 +0000 (06:50 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Fri, 28 Aug 2020 20:50:01 +0000 (06:50 +1000)
This reverts commit 33205d85e6afeed580bd50883d087eb045adbc86.

This patch was incorrect because it allows the trigger_hurt to damage a
player multiple times per frame.

qcsrc/common/mapobjects/trigger/hurt.qc

index 246bfdf9b55d9c1a35cf284339d063f48f6e0bd5..19447c41b99d2f3b563264f75601b85d50a2eae0 100644 (file)
@@ -22,10 +22,10 @@ void trigger_hurt_touch(entity this, entity toucher)
        if (toucher.iscreature)
        {
                if (toucher.takedamage)
-               if (toucher.triggerhurttime < time || (q3compat && !(this.spawnflags & HURT_SLOW)))
+               if (toucher.triggerhurttime < time)
                {
                        EXACTTRIGGER_TOUCH(this, toucher);
-                       toucher.triggerhurttime = time + 1;
+                       toucher.triggerhurttime = time + ((q3compat && !(this.spawnflags & HURT_SLOW)) ? 0.1 : 1);
 
                        entity own;
                        own = this.enemy;