Skip to content

Commit

Permalink
Clip difficulty modifiers to always at least be 1
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Jun 25, 2024
1 parent 1c65dbe commit 7766f63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/difficulty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ static int fDifEnemyModifier;

void setDamageModifiers(int playerModifier, int enemyModifier)
{
fDifPlayerModifier = playerModifier;
fDifEnemyModifier = (!bMultiPlayer && getCamTweakOption_PS1Modifiers()) ? enemyModifier / 3 : enemyModifier;
fDifPlayerModifier = std::max(1, playerModifier);
fDifEnemyModifier = std::max(1, (!bMultiPlayer && getCamTweakOption_PS1Modifiers()) ? enemyModifier / 3 : enemyModifier);
}

// ------------------------------------------------------------------------------------
Expand Down

0 comments on commit 7766f63

Please sign in to comment.