(svn r11806) -Fix (r11793) [FS#1638]: sign inversion when updating income and expenses
--- a/src/players.cpp Thu Jan 10 13:13:18 2008 +0000
+++ b/src/players.cpp Thu Jan 10 15:51:34 2008 +0000
@@ -204,14 +204,14 @@
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);