- fixed: "take armor" cheat should only deplete the armor, not destroy it.

- fixed: Hexen armor cannot be depleted by the common function, it needs an override to achieve that.
This commit is contained in:
Christoph Oelckers 2016-02-24 10:50:42 +01:00
commit 21c55a090a
3 changed files with 12 additions and 3 deletions

View file

@ -927,7 +927,7 @@ void cht_Take (player_t *player, const char *name, int amount)
AInventory *ammo = player->mo->FindInventory(static_cast<PClassActor *>(type));
if (ammo)
ammo->Amount = 0;
ammo->DepleteOrDestroy();
}
}
@ -943,10 +943,10 @@ void cht_Take (player_t *player, const char *name, int amount)
if (type->IsDescendantOf (RUNTIME_CLASS (AArmor)))
{
AActor *armor = player->mo->FindInventory(static_cast<PClassActor *>(type));
AInventory *armor = player->mo->FindInventory(static_cast<PClassActor *>(type));
if (armor)
armor->Destroy ();
armor->DepleteOrDestroy();
}
}