diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f71838e7b..64629b74a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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. diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index bd3f47a80..68dbda5cc 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -744,11 +744,11 @@ static int UseHealthItems(TArray &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++) {