rnd-19981014-1
[rocksndiamonds.git] / src / game.c
index 354c823b22a05c935f3a2b4ac15436424d275286..622a1857a553a41e70a89b7a00a9c5ff0cc152d4 100644 (file)
@@ -63,6 +63,9 @@ void InitGame()
   BOOL emulate_bd = TRUE;      /* unless non-BOULDERDASH elements found */
   BOOL emulate_sb = TRUE;      /* unless non-SOKOBAN     elements found */
 
+  /* don't play tapes over network */
+  network_playing = (network && !tape.playing);
+
   for(i=0; i<MAX_PLAYERS; i++)
   {
     struct PlayerInfo *player = &stored_player[i];
@@ -131,20 +134,10 @@ void InitGame()
 
   network_player_action_received = FALSE;
 
-
-
   /* initial null action */
-  if (network)
+  if (network_playing)
     SendToServer_MovePlayer(MV_NO_MOVING);
 
-
-
-  /*
-  printf("BLURB\n");
-  */
-
-
-
   ZX = ZY = -1;
 
   MampferNr = 0;
@@ -2889,7 +2882,7 @@ void GameActions(byte player_action)
   /* main game synchronization point */
   WaitUntilDelayReached(&action_delay, action_delay_value);
 
-  if (network && !network_player_action_received)
+  if (network_playing && !network_player_action_received)
   {
     /*
 #ifdef DEBUG
@@ -2926,13 +2919,18 @@ void GameActions(byte player_action)
   else
     recorded_player_action = NULL;
 
-  if (network)
+  if (network_playing)
     SendToServer_MovePlayer(player_action);
 
   for(i=0; i<MAX_PLAYERS; i++)
   {
+    /*
     int actual_player_action =
       (network ? network_player_action[i] : player_action);
+      */
+
+    int actual_player_action =
+      (network_playing ? network_player_action[i] : player_action);
 
     /*
     int actual_player_action = network_player_action[i];