From: Holger Schemel Date: Sat, 29 Feb 2020 13:40:36 +0000 (+0100) Subject: fixed initializing locally connected player in single player mode X-Git-Tag: 4.2.0.0~64 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7f125847296380e85814a98acb6a0b0dab4c2cf6;p=rocksndiamonds.git fixed initializing locally connected player in single player mode --- diff --git a/src/game.c b/src/game.c index 128c677f..d5256fd4 100644 --- a/src/game.c +++ b/src/game.c @@ -3753,12 +3753,13 @@ void InitGame(void) // use preferred player also in local single-player mode if (!network.enabled && !game.team_mode) { - int old_index_nr = local_player->index_nr; int new_index_nr = setup.network_player_nr; if (new_index_nr >= 0 && new_index_nr < MAX_PLAYERS) { - stored_player[old_index_nr].connected_locally = FALSE; + for (i = 0; i < MAX_PLAYERS; i++) + stored_player[i].connected_locally = FALSE; + stored_player[new_index_nr].connected_locally = TRUE; } }