From 0111ec451a3a3d67055d67c9b3de6fa3d8814f31 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 14 Nov 2016 15:52:49 +0100 Subject: [PATCH] Revert "Fixed: A_SetInventory with an amount of 0 was not truly eliminating the actor." This reverts commit 02435b46a0af7287a542a0887ec7ac7aa828f742. --- src/p_actionfunctions.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index b9cfd7fe0e..73cade49a4 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -2665,12 +2665,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetInventory) } else if (amount <= 0) { - // Remove it all. - if (item) - { - item->DepleteOrDestroy(); - res = true; - } + //Remove it all. + res = (mobj->TakeInventory(itemtype, item->Amount, true, false)); ACTION_RETURN_BOOL(res); } else if (amount < item->Amount)