]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/item_key.qc
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / item_key.qc
index d33fe87c2e1a477189000119b501b52c6f69c88e..c645c7facdce7515e3021c441bb586fdbfd1375a 100644 (file)
@@ -17,10 +17,10 @@ TODO:
 
 bool item_keys_usekey(entity l, entity p)
 {
-       float valid = l.itemkeys & p.itemkeys;
+       int valid = l.itemkeys & PS(p).itemkeys;
 
        if (!valid) {
-               // other has none of the needed keys
+               // player has none of the needed keys
                return false;
        } else if (l.itemkeys == valid) {
                // ALL needed keys were given
@@ -74,10 +74,10 @@ void item_key_touch(entity this, entity toucher)
                return;
 
        // player already picked up this key
-       if (toucher.itemkeys & this.itemkeys)
+       if (PS(toucher).itemkeys & this.itemkeys)
                return;
 
-       toucher.itemkeys |= this.itemkeys;
+       PS(toucher).itemkeys |= this.itemkeys;
        play2(toucher, this.noise);
 
        centerprint(toucher, this.message);