From: Mario Date: Wed, 24 May 2017 06:41:25 +0000 (+1000) Subject: Fix trigger_secret unreliability with triggering and sounds X-Git-Tag: xonotic-v0.8.5~2761 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d4c825430801392e5448a49d8e7309c1c0de34d3;p=xonotic%2Fxonotic-data.pk3dir.git Fix trigger_secret unreliability with triggering and sounds --- 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