diff --git a/src/economy.cpp b/src/economy.cpp --- a/src/economy.cpp +++ b/src/economy.cpp @@ -676,8 +676,11 @@ void AddInflation(bool check_year) * 12 -> months per year * This is only a good approxiamtion for small values */ - _economy.inflation_prices += min((_economy.inflation_prices * _economy.infl_amount * 54) >> 16, MAX_INFLATION); - _economy.inflation_payment += min((_economy.inflation_payment * _economy.infl_amount_pr * 54) >> 16, MAX_INFLATION); + _economy.inflation_prices += (_economy.inflation_prices * _economy.infl_amount * 54) >> 16; + _economy.inflation_payment += (_economy.inflation_payment * _economy.infl_amount_pr * 54) >> 16; + + if (_economy.inflation_prices > MAX_INFLATION) _economy.inflation_prices = MAX_INFLATION; + if (_economy.inflation_payment > MAX_INFLATION) _economy.inflation_payment = MAX_INFLATION; } /**