]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Use correct pickup item bboxes on clients"
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 25 May 2023 06:56:59 +0000 (16:56 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 25 May 2023 06:56:59 +0000 (16:56 +1000)
This reverts commit 2c5fb2544a77f2cf5fb786aca0d3e8b6e8aaf0cb.

qcsrc/client/items/items.qc
qcsrc/common/items/item.qh
qcsrc/server/items/items.qc

index 7e888e037640285cc582daacbeb9e0de7117ee6e..4c46ae0c4ae7d9455e6374ed944be6dfc3e9df12 100644 (file)
@@ -145,6 +145,11 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
         this.angles = ReadAngleVector();
     }
 
+    if(sf & ISF_SIZE)
+    {
+        setsize(this, '-16 -16 0', '16 16 48');
+    }
+
     if(sf & ISF_STATUS) // need to read/write status first so model can handle simple, fb etc.
     {
         this.ItemStatus = ReadByte();
@@ -225,14 +230,9 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
         _setmodel(this, this.mdl);
 
         this.skin = ReadByte();
-    }
 
-       if(sf & ISF_SIZE && sf & ISF_SIZE2) // Default
-               setsize(this, ITEM_D_MINS, ITEM_D_MAXS);
-       else if(sf & ISF_SIZE && !(sf & ISF_SIZE2)) // Small
-               setsize(this, ITEM_S_MINS, ITEM_S_MAXS);
-       else if(!(sf & ISF_SIZE) && sf & ISF_SIZE2) // Large
-               setsize(this, ITEM_D_MINS, ITEM_L_MAXS);
+        setsize(this, '-16 -16 0', '16 16 48');
+    }
 
     if(sf & ISF_COLORMAP)
     {
index 364baeebcac65f4d77c74bd768d225421a19fcf0..a4fea71ad8ec73842ebbe946d377a8b88a4e2a61 100644 (file)
@@ -38,7 +38,6 @@ const int IT_SPEED                                            = BIT(13);
 const int IT_PICKUPMASK                        = IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately
 
 // item networking
-const int ISF_SIZE2             = BIT(0);
 const int ISF_LOCATION          = BIT(1);
 const int ISF_MODEL             = BIT(2);
 const int ISF_STATUS            = BIT(3);
index ede9cbbaf0f3b5903b4384ddcdd59b2eba485d6d..57720ef9aff2e29fe8912ba276d50bb379e58600 100644 (file)
@@ -36,26 +36,6 @@ bool ItemSend(entity this, entity to, int sf)
        else
                sf &= ~ISF_DROP;
 
-       // if the client must set the bbox or model,
-       // reuse ISF_SIZE and ISF_SIZE2 to also tell it which bbox
-       if(sf & ISF_SIZE || sf & ISF_MODEL)
-       {
-               if(this.maxs == ITEM_S_MAXS) // Small
-               {
-                       sf |= ISF_SIZE;
-                       sf &= ~ISF_SIZE2;
-               }
-               else if(this.maxs == ITEM_L_MAXS) // Large
-               {
-                       sf &= ~ISF_SIZE;
-                       sf |= ISF_SIZE2;
-               }
-               else // Default
-                       sf |= ISF_SIZE | ISF_SIZE2;
-       }
-       else // don't set the bbox
-               sf &= ~ISF_SIZE & ~ISF_SIZE2;
-
        WriteHeader(MSG_ENTITY, ENT_CLIENT_ITEM);
        WriteByte(MSG_ENTITY, sf);
 
@@ -70,6 +50,9 @@ bool ItemSend(entity this, entity to, int sf)
                WriteAngleVector(MSG_ENTITY, this.angles);
        }
 
+       // sets size on the client, unused on server
+       //if(sf & ISF_SIZE)
+
        if(sf & ISF_STATUS)
                WriteByte(MSG_ENTITY, this.ItemStatus);