mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- 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:
parent
08730b941b
commit
ccd3b2a6e1
2 changed files with 7 additions and 3 deletions
|
@ -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
|
- 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
|
secondaryammo if ammo2's type was the same as ammo1's, but only if you
|
||||||
didn't use the "not" keyword with it.
|
didn't use the "not" keyword with it.
|
||||||
|
|
|
@ -744,11 +744,11 @@ static int UseHealthItems(TArray<AInventory *> &Items, int &saveHealth)
|
||||||
if (Items[i]->health > maxhealth)
|
if (Items[i]->health > maxhealth)
|
||||||
{
|
{
|
||||||
index = i;
|
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;
|
int count = (saveHealth + maxhealth-1) / maxhealth;
|
||||||
for(int i = 0; i < count; i++)
|
for(int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue