]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a way to trigger multi only when certain keys are pressed (intended for use on...
authorMario <zacjardine@y7mail.com>
Tue, 24 Mar 2015 16:02:41 +0000 (03:02 +1100)
committerMario <zacjardine@y7mail.com>
Tue, 24 Mar 2015 16:02:41 +0000 (03:02 +1100)
qcsrc/common/triggers/trigger/multi.qc

index ae73aaf7a457160832769f2886e18330165d5be4..16d72a8c4231e59836fe3438f63f66335cd5b1c7 100644 (file)
@@ -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;