X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=52ea43293cebaf68c232005cd88121809568ab26;hb=0cc0954e9803a0d5d27adc7b112a5c6966226080;hp=99540b18d9622ef055a0066d41c7e32f8dbb53d6;hpb=1b4dc75992f4992654cf9ae5da9e525cb676345b;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 99540b18..52ea4329 100644 --- a/src/game.c +++ b/src/game.c @@ -3738,6 +3738,19 @@ void InitGame(void) game.belt_dir_nr[i] = 3; // not moving, next moving left #if USE_NEW_PLAYER_ASSIGNMENTS + // 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; + stored_player[new_index_nr].connected_locally = TRUE; + } + } + for (i = 0; i < MAX_PLAYERS; i++) { stored_player[i].connected = FALSE;