From d4c825430801392e5448a49d8e7309c1c0de34d3 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 24 May 2017 16:41:25 +1000 Subject: [PATCH] Fix trigger_secret unreliability with triggering and sounds --- qcsrc/common/triggers/trigger/multi.qc | 2 +- qcsrc/common/triggers/trigger/secret.qc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/triggers/trigger/multi.qc b/qcsrc/common/triggers/trigger/multi.qc index 8f7305d6f..7e6311df1 100644 --- a/qcsrc/common/triggers/trigger/multi.qc +++ b/qcsrc/common/triggers/trigger/multi.qc @@ -55,7 +55,7 @@ void multi_trigger(entity this) } else { // we can't just remove (this) here, because this is a touch function - // called wheil C code is looping through area links... + // called while C code is looping through area links... settouch(this, func_null); } } diff --git a/qcsrc/common/triggers/trigger/secret.qc b/qcsrc/common/triggers/trigger/secret.qc index e6e35c295..1c0a328a1 100644 --- a/qcsrc/common/triggers/trigger/secret.qc +++ b/qcsrc/common/triggers/trigger/secret.qc @@ -34,7 +34,9 @@ void trigger_secret_touch(entity this, entity toucher) // handle normal trigger features multi_touch(this, toucher); - delete(this); + // we can't just remove (this) here, because this is a touch function + // called while C code is looping through area links... + //delete(this); } /*QUAKED trigger_secret (.5 .5 .5) ? @@ -76,7 +78,7 @@ spawnfunc(trigger_secret) this.delay = 0; // convert this trigger to trigger_once - this.classname = "trigger_once"; + //this.classname = "trigger_once"; spawnfunc_trigger_once(this); // take over the touch() function, so we can mark secret as found -- 2.39.2