--- a/src/players.cpp Tue May 27 14:11:56 2008 +0000
+++ b/src/players.cpp Tue May 27 15:24:23 2008 +0000
@@ -526,7 +526,6 @@
ResetPlayerLivery(p);
_player_colors[p->index] = p->player_color;
p->name_1 = STR_SV_UNNAMED;
- p->is_active = true;
p->player_money = p->current_loan = 100000;
@@ -551,7 +550,7 @@
InvalidateWindow(WC_TOOLBAR_MENU, 0);
InvalidateWindow(WC_CLIENT_LIST, 0);
- if (is_ai) AI_StartNewAI(p->index);
+ p->is_active = !is_ai || AI_StartNewAI(p->index);
free(p->num_engines);
p->num_engines = CallocT<uint16>(GetEnginePoolSize());
@@ -1325,7 +1324,7 @@
p->is_noai = true;
/* This is needed so an AI is attached to a loaded AI */
- if (p->is_ai) AI_StartNewAI(p->index);
+ p->is_ai = p->is_ai && AI_StartNewAI(p->index);
}
}