From ee7725ce5ca779e9fec4a05fa1a8ef2676873c1d Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Thu, 25 May 2023 16:54:40 +1000 Subject: [PATCH] Revert "Fix thrown/dropped loot items getting stuck in solid" This reverts commit eff0369f298449514619f34ce0c793bdb960b2b3. --- qcsrc/server/items/items.qc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index 0288498df..ede9cbbaf 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -998,13 +998,6 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default return; } - this.mdl = this.model ? this.model : strzone(this.item_model_ent.model_str()); - setmodel(this, MDL_Null); // precision set below - - // set item size before we spawn a waypoint or droptofloor or MoveOutOfSolid - setsize (this, this.pos1 = def.m_mins, this.pos2 = def.m_maxs); - this.SendFlags |= ISF_SIZE; - if (Item_IsLoot(this)) { this.reset = RemoveItem; @@ -1034,11 +1027,6 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default delete(this); return; } - - // most loot items have a bigger horizontal size than a player - WarpZoneLib_MoveOutOfSolid(this); - - this.gravity = 1; } else { @@ -1080,6 +1068,9 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default { // first nudge it off the floor a little bit to avoid math errors setorigin(this, this.origin + '0 0 1'); + // set item size before we spawn a spawnfunc_waypoint + setsize(this, def.m_mins, def.m_maxs); + this.SendFlags |= ISF_SIZE; // note droptofloor returns false if stuck/or would fall too far if (!this.noalign) droptofloor(this); @@ -1128,21 +1119,25 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default } Item_ItemsTime_SetTime(this, 0); - - this.glowmod = def.m_color; } this.bot_pickup = true; this.bot_pickupevalfunc = pickupevalfunc; this.bot_pickupbasevalue = pickupbasevalue; + this.mdl = this.model ? this.model : strzone(this.item_model_ent.model_str()); this.netname = itemname; settouch(this, Item_Touch); + setmodel(this, MDL_Null); // precision set below //this.effects |= EF_LOWPRECISION; // support skinned models for powerups if(!this.skin) this.skin = def.m_skin; + setsize (this, this.pos1 = def.m_mins, this.pos2 = def.m_maxs); + + this.SendFlags |= ISF_SIZE; + if (!(this.spawnflags & 1024)) { if(def.instanceOfPowerup) this.ItemStatus |= ITS_ANIMATE1; @@ -1151,6 +1146,11 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default this.ItemStatus |= ITS_ANIMATE2; } + if(Item_IsLoot(this)) + this.gravity = 1; + else + this.glowmod = def.m_color; + if(def.instanceOfWeaponPickup) { if (!Item_IsLoot(this)) // if dropped, colormap is already set up nicely -- 2.39.2