(svn r11717) -Fix [FS#1590]: make sure invalid players have all shares owned by PLAYER_SPECTATOR

This commit is contained in:
smatz
2007-12-28 18:25:30 +00:00
parent c87f20ff37
commit 108ab3b910
3 changed files with 25 additions and 2 deletions

View File

@@ -544,7 +544,10 @@ static void MaybeStartNewPlayer()
void InitializePlayers()
{
memset(_players, 0, sizeof(_players));
for (PlayerID i = PLAYER_FIRST; i != MAX_PLAYERS; i++) _players[i].index = i;
for (PlayerID i = PLAYER_FIRST; i != MAX_PLAYERS; i++) {
_players[i].index = i;
for (uint j = 0; j < 4; j++) _players[i].share_owners[j] = PLAYER_SPECTATOR;
}
_cur_player_tick_index = 0;
}