- 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:
Braden Obrzut 2014-01-18 15:45:11 -05:00
parent ebcd0e9c49
commit 919b928300

View file

@ -654,11 +654,18 @@ static void TakeStrifeItem (player_t *player, const PClass *itemtype, int amount
{
item->Amount -= amount;
if (item->Amount <= 0)
{
if (item->ItemFlags & IF_KEEPDEPLETED)
{
item->Amount = 0;
}
else
{
item->Destroy ();
}
}
}
}
CUSTOM_CVAR(Float, dlg_musicvolume, 1.0f, CVAR_ARCHIVE)
{