]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Port the g_inventory global entity from the scoreboard items branch, for accessing...
authorMario <mario@smbclan.net>
Sun, 10 Jun 2018 11:32:54 +0000 (21:32 +1000)
committerMario <mario@smbclan.net>
Sun, 10 Jun 2018 11:32:54 +0000 (21:32 +1000)
qcsrc/common/items/inventory.qh
qcsrc/server/g_damage.qc

index 8520075019b97c616107cabf94420ef9a27d58d6..9075c0912ed2a5044ba8e7b80b299a05723f31ba 100644 (file)
@@ -21,9 +21,11 @@ const int Inventory_groups_minor = 8; // ceil(Items_MAX / Inventory_groups_major
 #define G_MINOR(id) ((id) % Inventory_groups_minor)
 
 #ifdef CSQC
+Inventory g_inventory;
 NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
 {
     make_pure(this);
+    g_inventory = this;
     const int majorBits = ReadShort();
     for (int i = 0; i < Inventory_groups_major; ++i) {
         if (!(majorBits & BIT(i))) {
index e496404902dcd9e3b4daa2267de2d1f004ffd36f..21c00738ff3b113a2af00e4ddd569d640335dbf8 100644 (file)
@@ -24,6 +24,7 @@
 #include "../common/playerstats.qh"
 #include "../common/teams.qh"
 #include "../common/util.qh"
+#include <common/gamemodes/rules.qh>
 #include <common/weapons/_all.qh>
 #include "../lib/csqcmodel/sv_model.qh"
 #include "../lib/warpzone/common.qh"