]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/item_key.qc
Merge branch 'master' into terencehill/hud_cleanups
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / item_key.qc
index 713fbf6c3df57e87a8c704e7916da1ba11e562b0..8c5a06b320725657b56f0f54d4d3801c43a68adf 100644 (file)
@@ -1,11 +1,10 @@
 #include "item_key.qh"
-#include "_all.qh"
 
 #include "../common/triggers/subs.qh"
 #include "../common/monsters/all.qh"
 #include "../common/notifications.qh"
 #include "../common/util.qh"
-#include "../warpzonelib/util_server.qh"
+#include "../lib/warpzone/util_server.qh"
 
 /*
 TODO:
@@ -40,7 +39,7 @@ string item_keys_keylist(float keylist) {
                return "";
 
        // one key
-       if ((keylist & (keylist-1)) != 0)
+       if ((keylist & (keylist-1)) == 0)
                return strcat("the ", item_keys_names[lowestbit(keylist)]);
 
        string n = "";
@@ -82,6 +81,12 @@ void item_key_touch()
        play2(other, self.noise);
 
        centerprint(other, self.message);
+
+       string oldmsg = self.message;
+       self.message = "";
+       activator = other;
+       SUB_UseTargets();
+       self.message = oldmsg;
 };
 
 /**