]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Mario/reset_clear_item_waypoints' into 'master'
authorterencehill <piuntn@gmail.com>
Wed, 5 Oct 2022 16:08:25 +0000 (16:08 +0000)
committerterencehill <piuntn@gmail.com>
Wed, 5 Oct 2022 16:08:25 +0000 (16:08 +0000)
Clear item waypoints when deleting items to fix issues with dropped powerups

Closes #2735 and #2721

See merge request xonotic/xonotic-data.pk3dir!1070

1  2 
qcsrc/server/items/items.qc

index 89532a790efc8af3e7af5f2b968d8f7fb94d8db0,5758a7fda777d2b2191402661ea3c740f7cb3efc..6a19a435f2a502c05d0e6c8ed39ca7565c3a3601
@@@ -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")