oldloader.c
changeset 4845 72bbb6e2694e
parent 4549 106ed18a7675
child 4942 7fb6c39eb421
equal deleted inserted replaced
4844:10fde6a49e04 4845:72bbb6e2694e
   995 
   995 
   996 	/* State 20 for AI players is sell vehicle. Since the AI struct is not
   996 	/* State 20 for AI players is sell vehicle. Since the AI struct is not
   997 	 * really figured out as of now, p->ai.cur_veh; needed for 'sell vehicle'
   997 	 * really figured out as of now, p->ai.cur_veh; needed for 'sell vehicle'
   998 	 * is NULL and the function will crash. To fix this, just change the state
   998 	 * is NULL and the function will crash. To fix this, just change the state
   999 	 * to some harmless state, like 'loop vehicle'; 1 */
   999 	 * to some harmless state, like 'loop vehicle'; 1 */
  1000 	if (!IS_HUMAN_PLAYER(num) && p->ai.state == 20) p->ai.state = 1;
  1000 	if (!IsHumanPlayer(num) && p->ai.state == 20) p->ai.state = 1;
  1001 
  1001 
  1002 	if (p->is_ai && (!_networking || _network_server) && _ai.enabled)
  1002 	if (p->is_ai && (!_networking || _network_server) && _ai.enabled)
  1003 		AI_StartNewAI(p->index);
  1003 		AI_StartNewAI(p->index);
  1004 
  1004 
  1005 	return true;
  1005 	return true;