rnd-19981006-2
authorHolger Schemel <info@artsoft.org>
Mon, 5 Oct 1998 23:23:28 +0000 (01:23 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:31:02 +0000 (10:31 +0200)
src/game.c
src/network.c
src/screens.c

index d79e9e13bddcca4a7e933b301d5343f70d71bd72..640c248624ddd158dd29f6d33d2a9f3b06e677e0 100644 (file)
@@ -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);
index 81de0d5c011817b7cec175a1e4bd246a4d57d6ba..a88d55f6ecaeaafe2138414daa7758078f3d89cd 100644 (file)
@@ -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);
index 7ada948031b64f49761b25a0022ef27c0236454f..bc9412d2a3422b3f748ce15074d64dd54542befd 100644 (file)
@@ -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)
       {