- Fixed: UseHealthItems() gave you health equal to the number of items in

the stack of health items, rather than the item's proper amount.


SVN r1518 (trunk)
This commit is contained in:
Randy Heit 2009-04-03 01:25:06 +00:00
parent 08730b941b
commit ccd3b2a6e1
2 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,8 @@
April 1, 2008
April 2, 2009
- Fixed: UseHealthItems() gave you health equal to the number of items in
the stack of health items, rather than the item's proper amount.
April 1, 2008
- Fixed: SBARINFO's "usessecondaryammo" considered a weapon to not use
secondaryammo if ammo2's type was the same as ammo1's, but only if you
didn't use the "not" keyword with it.

View file

@ -744,11 +744,11 @@ static int UseHealthItems(TArray<AInventory *> &Items, int &saveHealth)
if (Items[i]->health > maxhealth)
{
index = i;
maxhealth = Items[i]->Amount;
maxhealth = Items[i]->health;
}
}
// Now apply the health items, using the same logic as Heretic anf Hexen.
// Now apply the health items, using the same logic as Heretic and Hexen.
int count = (saveHealth + maxhealth-1) / maxhealth;
for(int i = 0; i < count; i++)
{