equal
deleted
inserted
replaced
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; |