summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-01-10 15:51:34 +0000
committerglx <glx@openttd.org>2008-01-10 15:51:34 +0000
commit3976bb987d7dab7b748e768c9ebec8c54a54d9e1 (patch)
tree224c9a412aefd27ab801416954b4585e9c2844da
parent930f875c514560aac503b6b487460eac2d1dd41a (diff)
downloadopenttd-3976bb987d7dab7b748e768c9ebec8c54a54d9e1.tar.xz
(svn r11806) -Fix (r11793) [FS#1638]: sign inversion when updating income and expenses
-rw-r--r--src/players.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/players.cpp b/src/players.cpp
index 493a9877a..f886e287a 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -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);