Reset team status on new map picks.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6644 4a71c877-e1ca-e34f-864e-861f7616d084
master
Buginator 2009-02-15 06:37:30 +00:00
parent 1b5f3fafca
commit 46cac4d64b
1 changed files with 14 additions and 2 deletions

View File

@ -179,7 +179,7 @@ static BOOL safeToUseColour (UDWORD player,UDWORD col);
BOOL chooseColour (UDWORD); BOOL chooseColour (UDWORD);
static BOOL changeReadyStatus (UBYTE player, BOOL bReady); static BOOL changeReadyStatus (UBYTE player, BOOL bReady);
void resetReadyStatus (bool bSendOptions); void resetReadyStatus (bool bSendOptions);
void initTeams( void );
// //////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////////////
// map previews.. // map previews..
@ -2574,6 +2574,18 @@ void runMultiOptions(void)
} }
// //////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////////////
void initTeams()
{
int i;
for(i=0; i < MAX_PLAYERS; i++)
{
bTeamChooserUp[i] = false; // default is all false
playerTeam[i] = -1; //team each player belongs to (in the game) default = -1
playerTeamGUI[i] = i; //team each player belongs to (in skirmish setup screen)
}
}
BOOL startMultiOptions(BOOL bReenter) BOOL startMultiOptions(BOOL bReenter)
{ {
PLAYERSTATS nullStats; PLAYERSTATS nullStats;
@ -2585,7 +2597,7 @@ BOOL startMultiOptions(BOOL bReenter)
if(!bReenter) if(!bReenter)
{ {
initPlayerColours(); // force a colour clearout. initPlayerColours(); // force a colour clearout.
initTeams(); // reset teams to defaults.
for(i=0;i<MAX_PLAYERS;i++) for(i=0;i<MAX_PLAYERS;i++)
{ {
// game.skirmishPlayers[i] = 1; // clear out skirmish setting // game.skirmishPlayers[i] = 1; // clear out skirmish setting