(svn r11806) -Fix (r11793) [FS#1638]: sign inversion when updating income and expenses
authorglx
Thu, 10 Jan 2008 15:51:34 +0000
changeset 8242 719060189b7e
parent 8241 b5c1a0a74838
child 8243 6f76ab9f5ac0
(svn r11806) -Fix (r11793) [FS#1638]: sign inversion when updating income and expenses
src/players.cpp
--- 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);