- 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:
parent
8ba6f6ced5
commit
21c55a090a
3 changed files with 12 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue