]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/inventory.qh
Items: use Model references instead of strings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / inventory.qh
index a6d266ae5fba57d3d50727b25cb41d1fe1c396e2..f9193868f71a58be33b5f99b1d1e03d4fd89f7db 100644 (file)
@@ -44,7 +44,7 @@ bool Inventory_Send(entity this, entity to, int sf)
 {
     WriteByte(MSG_ENTITY, ENT_CLIENT_INVENTORY);
     entity e = self.owner;
-    if (IS_SPEC(e)) e = e.enemy;
+    if (/*IS_SPEC(e)*/ (e.classname == "spectator")) e = e.enemy;
     Inventory data = e.inventory;
     Inventory_Write(data);
     return true;
@@ -53,7 +53,7 @@ bool Inventory_Send(entity this, entity to, int sf)
 void Inventory_new(entity e)
 {
     Inventory inv = new(Inventory), bak = new(Inventory);
-    inv.classname = "inventory", bak.classname = "inventory";
+    inv.classname = bak.classname = "inventory";
     inv.inventory = bak;
     inv.drawonlytoclient = e;
     Net_LinkEntity((inv.owner = e).inventory = inv, false, 0, Inventory_Send);