X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fitem_key.qc;h=c645c7facdce7515e3021c441bb586fdbfd1375a;hb=9d323ee2bb47d17ece4b133cc498be455772e680;hp=05172241c3e320630e3e4fc02321de3ab370c86f;hpb=4d9a40898926a8da83b788f9a862f35cdd4c8905;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 05172241c..c645c7fac 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -1,7 +1,7 @@ #include "item_key.qh" #include "../common/triggers/subs.qh" -#include "../common/monsters/all.qh" +#include "../common/monsters/_mod.qh" #include "../common/notifications/all.qh" #include "../common/util.qh" #include "../lib/warpzone/util_server.qh" @@ -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);