X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ftrigger%2Fmulti.qc;h=0b0efc21c284d1e82cb6f253ccde21d30c6bdc3e;hb=HEAD;hp=c71dc3794822d5f41094411a7a6f3242b904219f;hpb=f70b6498d323bf8ee9bbdc9fe413ac1fbf94ccd8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/trigger/multi.qc b/qcsrc/common/mapobjects/trigger/multi.qc index c71dc3794..0b0efc21c 100644 --- a/qcsrc/common/mapobjects/trigger/multi.qc +++ b/qcsrc/common/mapobjects/trigger/multi.qc @@ -29,16 +29,7 @@ void multi_trigger(entity this) return; // only players } - // TODO: restructure this so that trigger_secret is more independent - if (this.classname == "trigger_secret") - { - if (!IS_PLAYER(this.enemy)) - return; - found_secrets = found_secrets + 1; - WriteByte (MSG_ALL, SVC_FOUNDSECRET); - } - - if (this.noise) + if (this.noise && this.noise != "") { _sound (this.enemy, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM); } @@ -61,6 +52,7 @@ void multi_trigger(entity this) { // we can't just delete(this) here, because this is a touch function // called while C code is looping through area links... settouch(this, func_null); + this.use = func_null; } } @@ -142,6 +134,7 @@ void multi_reset(entity this) setthink(this, func_null); this.nextthink = 0; this.team = this.team_saved; + this.use = multi_use; } /*QUAKED spawnfunc_trigger_multiple (.5 .5 .5) ? notouch @@ -167,7 +160,7 @@ spawnfunc(trigger_multiple) else if (this.sounds == 3) this.noise = "misc/trigger1.wav"; - if(this.noise) + if(this.noise && this.noise != "") precache_sound(this.noise); if (!this.wait) @@ -176,6 +169,9 @@ spawnfunc(trigger_multiple) this.wait = 0; this.use = multi_use; + if(this.wait == -1 && (q3compat & Q3COMPAT_DEFI)) + this.wait = 0.1; // compatibility for q3df: "instant" return + EXACTTRIGGER_INIT; this.team_saved = this.team;