diff --git a/src/namedef.h b/src/namedef.h index dc52d27f13..329b2cea39 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -170,6 +170,7 @@ xx(PuzzleItem) xx(PuzzleItemNumber) xx(HealthPickup) xx(autousemode) +xx(Ammo) xx(AcolyteBlue) xx(SpectralLightningV1) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index fc382a9886..b40b8baa3d 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1199,18 +1199,7 @@ void AActor::ClearInventory() AInventory *inv = *invp; if (!(inv->ItemFlags & IF_UNDROPPABLE)) { - // For the sake of undroppable weapons, never remove ammo once - // it has been acquired; just set its amount to 0. - if (inv->IsKindOf(RUNTIME_CLASS(AAmmo))) - { - AAmmo *ammo = static_cast(inv); - ammo->Amount = 0; - invp = &inv->Inventory; - } - else - { - inv->Destroy (); - } + inv->DepleteOrDestroy(); } else if (inv->GetClass() == RUNTIME_CLASS(AHexenArmor)) {