economy.c
changeset 2395 19b4da30806b
parent 2306 3d4efe849dd9
child 2425 99e1e8430a28
equal deleted inserted replaced
2394:4b778c9853fe 2395:19b4da30806b
    23 #include "sound.h"
    23 #include "sound.h"
    24 #include "engine.h"
    24 #include "engine.h"
    25 #include "network_data.h"
    25 #include "network_data.h"
    26 #include "variables.h"
    26 #include "variables.h"
    27 #include "vehicle_gui.h"
    27 #include "vehicle_gui.h"
       
    28 #include "ai/ai.h"
    28 
    29 
    29 // Score info
    30 // Score info
    30 const ScoreInfo _score_info[] = {
    31 const ScoreInfo _score_info[] = {
    31     {SCORE_VEHICLES,		120, 			100},
    32     {SCORE_VEHICLES,		120, 			100},
    32     {SCORE_STATIONS,		80, 			100},
    33     {SCORE_STATIONS,		80, 			100},
   471 				// Convert everything the player owns to NO_OWNER
   472 				// Convert everything the player owns to NO_OWNER
   472 				p->money64 = p->player_money = 100000000;
   473 				p->money64 = p->player_money = 100000000;
   473 				ChangeOwnershipOfPlayerItems(owner, 0xFF); // 255 is no owner
   474 				ChangeOwnershipOfPlayerItems(owner, 0xFF); // 255 is no owner
   474 				// Register the player as not-active
   475 				// Register the player as not-active
   475 				p->is_active = false;
   476 				p->is_active = false;
       
   477 
       
   478 				if (!IS_HUMAN_PLAYER(owner) && (!_networking || _network_server) && _ai.enabled)
       
   479 					AI_PlayerDied(owner);
   476 			}
   480 			}
   477 		}
   481 		}
   478 	}
   482 	}
   479 }
   483 }
   480 
   484 
  1247 			/* 4x */
  1251 			/* 4x */
  1248 			profit *= 4;
  1252 			profit *= 4;
  1249 		}
  1253 		}
  1250 	}
  1254 	}
  1251 
  1255 
  1252 	// Computers get 25% extra profit if they're intelligent.
       
  1253 	if (_opt.diff.competitor_intelligence>=1 && !IS_HUMAN_PLAYER(_current_player))
       
  1254 		profit += profit >> 2;
       
  1255 
       
  1256 	return profit;
  1256 	return profit;
  1257 }
  1257 }
  1258 
  1258 
  1259 /*
  1259 /*
  1260  * Returns true if Vehicle v should wait loading because other vehicle is
  1260  * Returns true if Vehicle v should wait loading because other vehicle is