]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/all.qh
Inventory system
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / all.qh
index 7290b95a90f1c26c3509198193b8bdb98b4d3060..1786b4261131d020fa92996027dee78c44c25a8d 100644 (file)
@@ -1,12 +1,12 @@
 #ifndef ALL_H
 #define ALL_H
 
-const int MAX_ITEMS = 23;
+const int MAX_ITEMS = 24;
 entity ITEMS[MAX_ITEMS];
 
 #define ITEMS_FOREACH(pred, body) do {      \
     for (int i = 0; i < ITEM_COUNT; i++) {  \
-        const entity it = ITEMS[i];         \
+        const noref entity it = ITEMS[i];   \
         if (pred) { body }                  \
     }                                       \
 } while(0)
@@ -14,25 +14,6 @@ entity ITEMS[MAX_ITEMS];
 void RegisterItems();
 void Dump_Items();
 
-#ifdef CSQC
-void ReadItems()
-{
-/*
-    const int flags = read();
-    for (int i = 0; i < MAX_ITEMS; i++) {
-        if (flags & BIT(i)) {
-            self.items[i] = read();
-        }
-    }
-*/
-}
 #endif
 
-#ifdef SVQC
-void WriteItems()
-{
-
-}
-#endif
-
-#endif
+#include "inventory.qh"