src/players.cpp
changeset 6841 46b2303390c6
parent 6724 4f404dfe9752
child 6943 1914f26aee04
equal deleted inserted replaced
6840:a6b64ff73787 6841:46b2303390c6
   191 	p->money64 -= cost;
   191 	p->money64 -= cost;
   192 	UpdatePlayerMoney32(p);
   192 	UpdatePlayerMoney32(p);
   193 
   193 
   194 	p->yearly_expenses[0][_yearly_expenses_type] += cost;
   194 	p->yearly_expenses[0][_yearly_expenses_type] += cost;
   195 
   195 
   196 	if (HASBIT(1<<7|1<<8|1<<9|1<<10, _yearly_expenses_type)) {
   196 	if (HASBIT(1 << EXPENSES_TRAIN_INC    |
       
   197 	           1 << EXPENSES_ROADVEH_INC  |
       
   198 	           1 << EXPENSES_AIRCRAFT_INC |
       
   199 	           1 << EXPENSES_SHIP_INC, _yearly_expenses_type)) {
   197 		p->cur_economy.income -= cost;
   200 		p->cur_economy.income -= cost;
   198 	} else if (HASBIT(1<<2|1<<3|1<<4|1<<5|1<<6|1<<11, _yearly_expenses_type)) {
   201 	} else if (HASBIT(1 << EXPENSES_TRAIN_RUN    |
       
   202 	                  1 << EXPENSES_ROADVEH_RUN  |
       
   203 	                  1 << EXPENSES_AIRCRAFT_RUN |
       
   204 	                  1 << EXPENSES_SHIP_RUN     |
       
   205 	                  1 << EXPENSES_PROPERTY     |
       
   206 	                  1 << EXPENSES_LOAN_INT, _yearly_expenses_type)) {
   199 		p->cur_economy.expenses -= cost;
   207 		p->cur_economy.expenses -= cost;
   200 	}
   208 	}
   201 
   209 
   202 	InvalidatePlayerWindows(p);
   210 	InvalidatePlayerWindows(p);
   203 }
   211 }