X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fmulti.qc;h=5e8c641be542735efe020f155f2d7ff556f7dcbc;hb=fdbfb6f9364d8aeae67e108400a6bd1dd37dc0b7;hp=b801e9f4f35cb169470cd0c87e62061ae19bb3f3;hpb=678388b78fdaad89fc8218dadf7007432b4153c3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/multi.qc b/qcsrc/common/triggers/trigger/multi.qc index b801e9f4f3..5e8c641be5 100644 --- a/qcsrc/common/triggers/trigger/multi.qc +++ b/qcsrc/common/triggers/trigger/multi.qc @@ -1,3 +1,4 @@ +#include "multi.qh" // NOTE: also contains trigger_once at bottom #ifdef SVQC @@ -53,8 +54,8 @@ void multi_trigger(entity this) multi_wait(this); // waiting finished } else - { // we can't just remove (this) here, because this is a touch function - // called wheil C code is looping through area links... + { // 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); } } @@ -85,9 +86,8 @@ void multi_touch(entity this, entity toucher) } // if the trigger has pressed keys, check that the player is pressing those keys - if(this.pressedkeys) - if(IS_PLAYER(toucher)) // only for players - if(!(toucher.pressedkeys & this.pressedkeys)) + if(this.pressedkeys && IS_PLAYER(toucher)) // only for players + if(!(CS(toucher).pressedkeys & this.pressedkeys)) return; EXACTTRIGGER_TOUCH(this, toucher); @@ -163,6 +163,7 @@ spawnfunc(trigger_multiple) EXACTTRIGGER_INIT; this.team_saved = this.team; + IL_PUSH(g_saved_team, this); if (this.health) {