Skip to content
Permalink
Browse files

Merge pull request #496 from Yaribz/playerAdvantageFix

fix SetAdvantage function to allow negative values
  • Loading branch information
gajop committed Mar 8, 2020
2 parents b664425 + 8779c74 commit 8b22cebde9fddc9039cb0718afb292ee7531b7d0
Showing with 1 addition and 1 deletion.
  1. +1 −1 rts/Sim/Misc/TeamBase.h
@@ -70,7 +70,7 @@ class TeamBase
*
* @see incomeMultiplier
*/
void SetAdvantage(float advantage) { SetIncomeMultiplier(std::max(0.0f, advantage) + 1.0f); }
void SetAdvantage(float advantage) { SetIncomeMultiplier(std::max(-1.0f, advantage) + 1.0f); }

void SetIncomeMultiplier(float incomeMult) { incomeMultiplier = std::max(0.0f, incomeMult); }
float GetIncomeMultiplier() const { return incomeMultiplier; }

0 comments on commit 8b22ceb

Please sign in to comment.
You can’t perform that action at this time.