From: Mario Date: Tue, 24 Mar 2015 16:02:41 +0000 (+1100) Subject: Add a way to trigger multi only when certain keys are pressed (intended for use on... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=284effca5269233d9efb083eaba0c216398bea8a;p=xonotic%2Fxonotic-data.pk3dir.git Add a way to trigger multi only when certain keys are pressed (intended for use on warp pipes) --- diff --git a/qcsrc/common/triggers/trigger/multi.qc b/qcsrc/common/triggers/trigger/multi.qc index ae73aaf7a..16d72a8c4 100644 --- a/qcsrc/common/triggers/trigger/multi.qc +++ b/qcsrc/common/triggers/trigger/multi.qc @@ -82,6 +82,12 @@ void multi_touch() return; // not facing the right way } + // if the trigger has pressed keys, check that the player is pressing those keys + if(self.pressedkeys) + if(IS_PLAYER(other)) // only for players + if(!(other.pressedkeys & self.pressedkeys)) + return; + EXACTTRIGGER_TOUCH; self.enemy = other;