X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=8b5d2a79f7a5cc4bc6e2f5305540b9c45ad61c51;hb=0a87fde47bcff35f196024766f8d0d00319a28d1;hp=e9f9d041c82b9475046f91eb1b1d7560e27b2006;hpb=4f767d54c7ac468e9a42e22caf716111be1ceba9;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index e9f9d041..8b5d2a79 100644 --- a/src/game.c +++ b/src/game.c @@ -238,9 +238,11 @@ void InitGame() network_player_action_received = FALSE; +#ifndef MSDOS /* initial null action */ if (network_playing) SendToServer_MovePlayer(MV_NO_MOVING); +#endif ZX = ZY = -1; @@ -427,20 +429,38 @@ void InitGame() } } - /* when in single player mode, eliminate all but the first active player */ - if (!options.network && !setup.team_mode) + if (tape.playing) + { + /* when playing a tape, eliminate all players who do not participate */ + + for (i=0; ijx, jy = player->jy; + + player->active = FALSE; + StorePlayer[jx][jy] = 0; + Feld[jx][jy] = EL_LEERRAUM; + } + } + } + else if (!options.network && !setup.team_mode) /* && !tape.playing */ { + /* when in single player mode, eliminate all but the first active player */ + for (i=0; ijx, jy = player->jy; - - if (player->active) + if (stored_player[j].active) { + struct PlayerInfo *player = &stored_player[j]; + int jx = player->jx, jy = player->jy; + player->active = FALSE; StorePlayer[jx][jy] = 0; Feld[jx][jy] = EL_LEERRAUM; @@ -450,6 +470,14 @@ void InitGame() } } + /* when recording the game, store which players take part in the game */ + if (tape.recording) + { + for (i=0; iscore < highscore[MAX_SCORE_ENTRIES-1].Score) + if (strcmp(setup.player_name, EMPTY_PLAYER_NAME) == 0 || + local_player->score < highscore[MAX_SCORE_ENTRIES - 1].Score) return -1; for (k=0; keffective_action = summarized_player_action;