Skip to content

Commit

Permalink
Doom|Fixed: Backward compatibility issue with God Health
Browse files Browse the repository at this point in the history
Earlier versions did not implement a separate value for God Health,
consequently old mods that modified Max Health expect that this is
also used for God Health.
  • Loading branch information
danij-deng committed Jan 20, 2012
1 parent 455b0e8 commit a785b4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion doomsday/plugins/common/src/p_start.c
Expand Up @@ -213,7 +213,13 @@ void P_Update(void)
armorClass[1] = armorClass[2] = armorClass[3] = 2;

GetDefInt("Player|Health Limit", &healthLimit);
GetDefInt("Player|God Health", &godModeHealth);

// Previous versions did not feature a separate value for God Health,
// so if its not found, default to the value of Max Health.
if(!GetDefInt("Player|God Health", &godModeHealth))
{
godModeHealth = maxHealth;
}

GetDefInt("Player|Green Armor", &armorPoints[0]);
GetDefInt("Player|Blue Armor", &armorPoints[1]);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom/defs/values.ded
Expand Up @@ -61,7 +61,7 @@ Values {
Health = "100"; # Initial health.
Max Health = "100"; # Maximum health.
Health Limit = "200"; # Absolute health limit.
God Health = "100"; # Health when god mode is activated.
#God Health = "100"; # Health when god mode is activated.
Green Armor = "100";
Blue Armor = "200";
IDFA Armor = "200"; # Armor given when the IDFA cheat is activated.
Expand Down

0 comments on commit a785b4e

Please sign in to comment.