From 4ec20866e25b667c62cc8a427608045993c18def Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sat, 29 Aug 2020 06:50:01 +1000 Subject: [PATCH] Revert "q3compat: make trigger_hurt without spawnflags 16 deal damage every frame even if triggerhurttime still on cooldown" 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/mapobjects/trigger/hurt.qc b/qcsrc/common/mapobjects/trigger/hurt.qc index 246bfdf9b..19447c41b 100644 --- a/qcsrc/common/mapobjects/trigger/hurt.qc +++ b/qcsrc/common/mapobjects/trigger/hurt.qc @@ -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; -- 2.39.2