mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r11806) -Fix (r11793) [FS#1638]: sign inversion when updating income and expenses
This commit is contained in:
parent
9629b26677
commit
fe35fa15e4
@ -204,14 +204,14 @@ static void SubtractMoneyFromAnyPlayer(Player *p, CommandCost cost)
|
||||
1 << EXPENSES_ROADVEH_INC |
|
||||
1 << EXPENSES_AIRCRAFT_INC |
|
||||
1 << EXPENSES_SHIP_INC, cost.GetExpensesType())) {
|
||||
p->cur_economy.income += cost.GetCost();
|
||||
p->cur_economy.income -= cost.GetCost();
|
||||
} else if (HasBit(1 << EXPENSES_TRAIN_RUN |
|
||||
1 << EXPENSES_ROADVEH_RUN |
|
||||
1 << EXPENSES_AIRCRAFT_RUN |
|
||||
1 << EXPENSES_SHIP_RUN |
|
||||
1 << EXPENSES_PROPERTY |
|
||||
1 << EXPENSES_LOAN_INT, cost.GetExpensesType())) {
|
||||
p->cur_economy.expenses += cost.GetCost();
|
||||
p->cur_economy.expenses -= cost.GetCost();
|
||||
}
|
||||
|
||||
InvalidatePlayerWindows(p);
|
||||
|
Loading…
Reference in New Issue
Block a user