File diff r4844:dcf812ad20ab → r4845:2200ed004c20
oldloader.c
Show inline comments
 
@@ -994,13 +994,13 @@ static bool LoadOldPlayer(LoadgameState 
 
		p->location_of_house = 0;
 

	
 
	/* State 20 for AI players is sell vehicle. Since the AI struct is not
 
	 * really figured out as of now, p->ai.cur_veh; needed for 'sell vehicle'
 
	 * is NULL and the function will crash. To fix this, just change the state
 
	 * to some harmless state, like 'loop vehicle'; 1 */
 
	if (!IS_HUMAN_PLAYER(num) && p->ai.state == 20) p->ai.state = 1;
 
	if (!IsHumanPlayer(num) && p->ai.state == 20) p->ai.state = 1;
 

	
 
	if (p->is_ai && (!_networking || _network_server) && _ai.enabled)
 
		AI_StartNewAI(p->index);
 

	
 
	return true;
 
}