From: bones_was_here Date: Thu, 25 May 2023 06:56:59 +0000 (+1000) Subject: Revert "Use correct pickup item bboxes on clients" X-Git-Tag: xonotic-v0.8.6~76 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eb4441ee974bb1317708cdd816425e07889c3ac2;p=xonotic%2Fxonotic-data.pk3dir.git Revert "Use correct pickup item bboxes on clients" This reverts commit 2c5fb2544a77f2cf5fb786aca0d3e8b6e8aaf0cb. --- diff --git a/qcsrc/client/items/items.qc b/qcsrc/client/items/items.qc index 7e888e037..4c46ae0c4 100644 --- a/qcsrc/client/items/items.qc +++ b/qcsrc/client/items/items.qc @@ -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) { diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index 364baeebc..a4fea71ad 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -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); diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index ede9cbbaf..57720ef9a 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -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);