X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=9897b56d78778dfa99cbe9dea30f99315560e1cf;hb=b4045ec83a11b71b7348575d2c76783cde14dccd;hp=e9f9d041c82b9475046f91eb1b1d7560e27b2006;hpb=4f767d54c7ac468e9a42e22caf716111be1ceba9;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index e9f9d041..9897b56d 100644 --- a/src/game.c +++ b/src/game.c @@ -101,6 +101,7 @@ int game_emulation = EMU_NONE; + #ifdef DEBUG #if 0 static unsigned int getStateCheckSum(int counter) @@ -153,6 +154,7 @@ static unsigned int getStateCheckSum(int counter) + void GetPlayerConfig() { if (sound_status == SOUND_OFF) @@ -238,9 +240,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 +431,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 +472,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; @@ -3674,7 +3740,7 @@ void ScrollFigure(struct PlayerInfo *player, int mode) void ScrollScreen(struct PlayerInfo *player, int mode) { - static long screen_frame_counter = 0; + static unsigned long screen_frame_counter = 0; if (mode == SCROLL_INIT) {