X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fitem_key.qc;h=994e6a6f18a1b7809a57672a46376710f1d3cf2d;hb=845401fd312c66c059aaee1772ac5d79555ab4fc;hp=964f065e3c46e01a6e9c1be42cbb7d198b5e166e;hpb=6c4f62990980e74d4a0963b7179c7c964f535398;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 964f065e3..994e6a6f1 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -12,15 +12,15 @@ bool item_keys_usekey(entity l, entity p) { if (!valid) { // other has none of the needed keys - return FALSE; + return false; } else if (l.itemkeys == valid) { // ALL needed keys were given l.itemkeys = 0; - return TRUE; + return true; } else { // only some of the needed keys were given l.itemkeys &= ~valid; - return TRUE; + return true; } } @@ -105,7 +105,7 @@ void spawn_item_key() { { // first nudge it off the floor a little bit to avoid math errors setorigin(self, self.origin + '0 0 1'); - // note droptofloor returns FALSE if stuck/or would fall too far + // note droptofloor returns false if stuck/or would fall too far droptofloor(); } @@ -308,8 +308,8 @@ void trigger_keylock_kill(string s) { }; void trigger_keylock_touch(void) { - bool key_used = FALSE; - bool started_delay = FALSE; + bool key_used = false; + bool started_delay = false; // only player may trigger the lock if (!IS_PLAYER(other)) @@ -337,10 +337,10 @@ void trigger_keylock_touch(void) { } // trigger target2 - if (self.delay <= time || started_delay == TRUE) + if (self.delay <= time || started_delay == true) if (self.target2) { trigger_keylock_trigger(self.target2); - started_delay = TRUE; + started_delay = true; self.delay = time + self.wait; } } else {