diff --git a/wadsrc/static/zscript/actors/inventory/inventory.zs b/wadsrc/static/zscript/actors/inventory/inventory.zs index f41880a3c0..52009f2e11 100644 --- a/wadsrc/static/zscript/actors/inventory/inventory.zs +++ b/wadsrc/static/zscript/actors/inventory/inventory.zs @@ -940,7 +940,6 @@ class Inventory : Actor } else { - Owner = null; Destroy(); } } diff --git a/wadsrc/static/zscript/actors/inventory_util.zs b/wadsrc/static/zscript/actors/inventory_util.zs index e47172a495..011ca134f4 100644 --- a/wadsrc/static/zscript/actors/inventory_util.zs +++ b/wadsrc/static/zscript/actors/inventory_util.zs @@ -333,13 +333,8 @@ extend class Actor // destroy something we already processed, we've already destroyed it, // so it won't have anything to destroy. - if (player != null) - { - player.ReadyWeapon = null; - player.PendingWeapon = WP_NOCHANGE; - } - let last = self; + while (last.inv != NULL) { let inv = last.inv; @@ -353,6 +348,11 @@ extend class Actor last = inv; } } + if (player != null) + { + player.ReadyWeapon = null; + player.PendingWeapon = WP_NOCHANGE; + } }