rnd-19981108-2
[rocksndiamonds.git] / src / network.c
index 092de4d0a3d55819e61c87d3a3e0601b2be4f4d9..890f405f91662423040114fc731f1db90c322af7 100644 (file)
@@ -145,7 +145,7 @@ static void StartNetworkServer(int port)
       exit(0);
 
     case -1:
-      Error(ERR_RETURN,
+      Error(ERR_WARN,
            "cannot create network server process - no network games");
       options.network = FALSE;
       return;
@@ -303,7 +303,7 @@ void SendToServer_MovePlayer(byte player_action)
 
 static void Handle_OP_BAD_PROTOCOL_VERSION()
 {
-  Error(ERR_RETURN, "protocol version mismatch");
+  Error(ERR_WARN, "protocol version mismatch");
   Error(ERR_EXIT, "server expects %d.%d.x instead of %d.%d.%d",
        buf[2], buf[3], PROT_VERS_1, PROT_VERS_2, PROT_VERS_3);
 }
@@ -324,7 +324,6 @@ static void Handle_OP_YOUR_NUMBER()
 
     *new_local_player = *old_local_player;
     old_local_player->connected = FALSE;
-    old_local_player->local = FALSE;
 
     local_player = new_local_player;
   }
@@ -373,7 +372,6 @@ static void Handle_OP_NUMBER_WANTED()
 
       *new_player = *old_player;
       old_player->connected = FALSE;
-      old_player->local = FALSE;
     }
 
     u = finduser(old_client_nr);
@@ -480,25 +478,39 @@ static void Handle_OP_START_PLAYING()
 
 
   if (strcmp(leveldir[new_leveldir_nr].name, new_leveldir_name) != 0)
-    Error(ERR_RETURN, "no such level directory: '%s'",new_leveldir_name);
+    Error(ERR_WARN, "no such level directory: '%s'",new_leveldir_name);
 
   leveldir_nr = new_leveldir_nr;
 
+  /*
   local_player->leveldir_nr = leveldir_nr;
+  */
+
+
+  /*
+  SaveLevelSetup();
+  */
+
+  /*
   LoadPlayerInfo(PLAYER_LEVEL);
   SavePlayerInfo(PLAYER_SETUP);
+  */
+
 
   level_nr = new_level_nr;
 
   TapeErase();
-  LoadLevelTape(level_nr);
+  LoadTape(level_nr);
 
+  /*
   GetPlayerConfig();
+  */
+
   LoadLevel(level_nr);
 
 
 
-  if (setup.autorecord_on)
+  if (setup.autorecord)
     TapeStartRecording();
 
 
@@ -568,7 +580,7 @@ static void Handle_OP_MOVE_FIGURE(unsigned int len)
 
   /* copy valid player actions */
   for (i=0; i<MAX_PLAYERS; i++)
-    network_player_action[i] =
+    stored_player[i].effective_action =
       (i < len - 6 && stored_player[i].active ? buf[6 + i] : 0);
 
   network_player_action_received = TRUE;