From: Holger Schemel Date: Fri, 4 Jan 2019 17:03:14 +0000 (+0100) Subject: added using preferred network player also in single-player mode X-Git-Tag: 4.1.2.0~66 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=eb3ba964d197f895876ac3d9e424803df90e0c8f;p=rocksndiamonds.git added using preferred network player also in single-player mode --- 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;