From: terencehill Date: Wed, 5 Oct 2022 16:08:25 +0000 (+0000) Subject: Merge branch 'Mario/reset_clear_item_waypoints' into 'master' X-Git-Tag: xonotic-v0.8.6~337 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4677838f1b8eede1622d78afe6e156991ebda476;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'Mario/reset_clear_item_waypoints' into 'master' Clear item waypoints when deleting items to fix issues with dropped powerups Closes #2735 and #2721 See merge request xonotic/xonotic-data.pk3dir!1070 --- 4677838f1b8eede1622d78afe6e156991ebda476 diff --cc qcsrc/server/items/items.qc index 89532a790,5758a7fda..6a19a435f --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@@ -974,16 -977,9 +976,16 @@@ void _StartItem(entity this, entity def precache_model(this.model); precache_sound(this.item_pickupsound); + if(q3compat && !this.team) + { + string t = GetField_fullspawndata(this, "team", false); + // bones_was_here: this hack is cheaper than changing to a .string strcmp() + if(t) this.team = crc16(false, t); + } + if (Item_IsLoot(this)) { - this.reset = SUB_Remove; + this.reset = RemoveItem; set_movetype(this, MOVETYPE_TOSS); // Savage: remove thrown items after a certain period of time ("garbage collection")