mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Fixed: Taking an item in a Strife dialog didn't account for items that have the keep depleted flag set.
This commit is contained in:
parent
ebcd0e9c49
commit
919b928300
1 changed files with 8 additions and 1 deletions
|
@ -654,10 +654,17 @@ static void TakeStrifeItem (player_t *player, const PClass *itemtype, int amount
|
||||||
{
|
{
|
||||||
item->Amount -= amount;
|
item->Amount -= amount;
|
||||||
if (item->Amount <= 0)
|
if (item->Amount <= 0)
|
||||||
|
{
|
||||||
|
if (item->ItemFlags & IF_KEEPDEPLETED)
|
||||||
|
{
|
||||||
|
item->Amount = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
item->Destroy ();
|
item->Destroy ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR(Float, dlg_musicvolume, 1.0f, CVAR_ARCHIVE)
|
CUSTOM_CVAR(Float, dlg_musicvolume, 1.0f, CVAR_ARCHIVE)
|
||||||
|
|
Loading…
Reference in a new issue