]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix trigger_secret unreliability with triggering and sounds
authorMario <mario@smbclan.net>
Wed, 24 May 2017 06:41:25 +0000 (16:41 +1000)
committerMario <mario@smbclan.net>
Wed, 24 May 2017 06:41:25 +0000 (16:41 +1000)
qcsrc/common/triggers/trigger/multi.qc
qcsrc/common/triggers/trigger/secret.qc

index 8f7305d6f88c49236397721a14a0f5813087ab45..7e6311df1bc7cde481ee40b3efcf54ec58e51522 100644 (file)
@@ -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);
        }
 }
index e6e35c295a9f8d723285699de7db0972e850ea9c..1c0a328a13a21d638fa5b4347829ecde721a4121 100644 (file)
@@ -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