mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- fixed: AActor::ClearInventory should respect IF_KEEPDEPLETED for all items.
This commit is contained in:
parent
03c7b10fd6
commit
bf52ce19e4
2 changed files with 2 additions and 12 deletions
|
@ -170,6 +170,7 @@ xx(PuzzleItem)
|
|||
xx(PuzzleItemNumber)
|
||||
xx(HealthPickup)
|
||||
xx(autousemode)
|
||||
xx(Ammo)
|
||||
|
||||
xx(AcolyteBlue)
|
||||
xx(SpectralLightningV1)
|
||||
|
|
|
@ -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<AAmmo*>(inv);
|
||||
ammo->Amount = 0;
|
||||
invp = &inv->Inventory;
|
||||
}
|
||||
else
|
||||
{
|
||||
inv->Destroy ();
|
||||
}
|
||||
inv->DepleteOrDestroy();
|
||||
}
|
||||
else if (inv->GetClass() == RUNTIME_CLASS(AHexenArmor))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue