fixed selection of ai players in a single game

origin
stpohle 22 years ago
parent be96cbec38
commit c8b9b318a5

@ -1,4 +1,4 @@
/* $Id: single.c,v 1.64 2004/06/08 22:35:26 stpohle Exp $ */ /* $Id: single.c,v 1.65 2004/06/13 12:03:26 stpohle Exp $ */
/* single player */ /* single player */
#include "basic.h" #include "basic.h"
@ -556,6 +556,8 @@ single_create_ai (int num_players)
i = 0; i = 0;
_player *pl; _player *pl;
d_printf ("single_create_ai : number of ai players %d\n", num_players);
for (count = 0; count < num_players; count++) { for (count = 0; count < num_players; count++) {
/* find free players */ /* find free players */
for (pl = NULL, p = 0; (pl == NULL && p < MAX_PLAYERS); p++) for (pl = NULL, p = 0; (pl == NULL && p < MAX_PLAYERS); p++)
@ -783,8 +785,10 @@ single_menu ()
s_calctimesync (); s_calctimesync ();
} while (!done); } while (!done);
if (menu->focus->id == 2) if (menu->focus->id == 2) {
bman.ai_players = selnrplayer - &nrplayerlist[0];
single_playergame (second_player, bman.ai_players); single_playergame (second_player, bman.ai_players);
}
menu_delete (menu); menu_delete (menu);
}; };

Loading…
Cancel
Save