From: Holger Schemel Date: Mon, 5 Oct 1998 23:23:28 +0000 (+0200) Subject: rnd-19981006-2 X-Git-Tag: 1.2.0^2~63 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=35a6bb2e02a14cb70796f2a165736f515669208c;p=rocksndiamonds.git rnd-19981006-2 --- diff --git a/src/game.c b/src/game.c index d79e9e13..640c2486 100644 --- a/src/game.c +++ b/src/game.c @@ -4023,7 +4023,8 @@ BOOL PlaceBomb(struct PlayerInfo *player) player->dynamite--; DrawText(DX_DYNAMITE, DY_DYNAMITE, int2str(local_player->dynamite, 3), FS_SMALL, FC_YELLOW); - DrawGraphicThruMask(SCREENX(jx),SCREENY(jy),GFX_DYNAMIT); + if (IN_SCR_FIELD(SCREENX(jx),SCREENY(jy))) + DrawGraphicThruMask(SCREENX(jx),SCREENY(jy),GFX_DYNAMIT); } else { @@ -4031,7 +4032,8 @@ BOOL PlaceBomb(struct PlayerInfo *player) Store2[jx][jy] = player->element_nr; /* for DynaExplode() */ MovDelay[jx][jy] = 96; player->dynabombs_left--; - DrawGraphicThruMask(SCREENX(jx),SCREENY(jy),GFX_DYNABOMB); + if (IN_SCR_FIELD(SCREENX(jx),SCREENY(jy))) + DrawGraphicThruMask(SCREENX(jx),SCREENY(jy),GFX_DYNABOMB); } return(TRUE); diff --git a/src/network.c b/src/network.c index 81de0d5c..a88d55f6 100644 --- a/src/network.c +++ b/src/network.c @@ -475,6 +475,9 @@ void handlemessages() unsigned long new_random_seed; unsigned char *new_leveldir_name; + if (game_status == PLAYING) + break; + new_level_nr = (buf[2] << 8) + buf[3]; new_leveldir_nr = (buf[4] << 8) + buf[5]; new_random_seed = @@ -507,12 +510,16 @@ void handlemessages() GetPlayerConfig(); LoadLevel(level_nr); + /* if (autorecord_on) TapeStartRecording(); + */ - tape.random_seed = new_random_seed; - - InitRND(tape.random_seed); + if (tape.recording) + { + tape.random_seed = new_random_seed; + InitRND(tape.random_seed); + } /* printf("tape.random_seed == %d\n", tape.random_seed); diff --git a/src/screens.c b/src/screens.c index 7ada9480..bc9412d2 100644 --- a/src/screens.c +++ b/src/screens.c @@ -215,11 +215,11 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (y==8) { + if (autorecord_on) + TapeStartRecording(); + if (standalone) { - if (autorecord_on) - TapeStartRecording(); - game_status = PLAYING; InitGame(); } @@ -1355,8 +1355,14 @@ void HandleVideoButtons(int mx, int my, int button) if (TAPE_IS_STOPPED(tape)) { TapeStartRecording(); - game_status = PLAYING; - InitGame(); + + if (standalone) + { + game_status = PLAYING; + InitGame(); + } + else + SendToServer_StartPlaying(); } else if (tape.pausing) { @@ -1380,8 +1386,14 @@ void HandleVideoButtons(int mx, int my, int button) if (TAPE_IS_STOPPED(tape)) { TapeStartPlaying(); - game_status = PLAYING; - InitGame(); + + if (standalone) + { + game_status = PLAYING; + InitGame(); + } + else + SendToServer_StartPlaying(); } else if (tape.playing) {