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