X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=d37dee3a5f7c162ce69acdf33167a2d3b64f2233;hb=7466541c01db2ed673eee2302cd3ede5a5fbdf5e;hp=13634a2c76122ab7b2a37f0482a5c123b1ecb90a;hpb=fdbb975aee39b32064a9fdc461467e733c7854c9;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 13634a2c..d37dee3a 100644 --- a/src/game.c +++ b/src/game.c @@ -3962,26 +3962,21 @@ void InitGame() } else if (!network.enabled && !game.team_mode) /* && !tape.playing */ { - /* when in single player mode, eliminate all but the first active player */ + /* when in single player mode, eliminate all but the local player */ for (i = 0; i < MAX_PLAYERS; i++) { - if (stored_player[i].active) + struct PlayerInfo *player = &stored_player[i]; + + if (player->active && player != local_player) { - for (j = i + 1; j < MAX_PLAYERS; j++) - { - if (stored_player[j].active) - { - struct PlayerInfo *player = &stored_player[j]; - int jx = player->jx, jy = player->jy; + int jx = player->jx, jy = player->jy; - player->active = FALSE; - player->present = FALSE; + player->active = FALSE; + player->present = FALSE; - StorePlayer[jx][jy] = 0; - Feld[jx][jy] = EL_EMPTY; - } - } + StorePlayer[jx][jy] = 0; + Feld[jx][jy] = EL_EMPTY; } } }