added sending level file (and level template) for network games
[rocksndiamonds.git] / src / game.c
index 2e504df5d5188103bc46381436ec12bc71781972..380614c4b9799c766d0104d11135be76aa127648 100644 (file)
@@ -2224,7 +2224,8 @@ void UpdateGameControlValues()
 
   /* update game panel control values */
 
-  game_panel_controls[GAME_PANEL_LEVEL_NUMBER].value = level_nr;
+  /* use "level.file_info.nr" instead of "level_nr" (for network games) */
+  game_panel_controls[GAME_PANEL_LEVEL_NUMBER].value = level.file_info.nr;
   game_panel_controls[GAME_PANEL_GEMS].value = gems;
 
   game_panel_controls[GAME_PANEL_INVENTORY_COUNT].value = 0;
@@ -4422,6 +4423,10 @@ void InitAmoebaNr(int x, int y)
 
 static void PlayerWins(struct PlayerInfo *player)
 {
+  if (level.game_engine_type == GAME_ENGINE_TYPE_RND &&
+      local_player->players_still_needed > 0)
+    return;
+
   player->LevelSolved = TRUE;
   player->GameOver = TRUE;
 
@@ -11223,6 +11228,7 @@ void StartGameActions(boolean init_network_game, boolean record_tape,
 
   if (init_network_game)
   {
+    SendToServer_LevelFile();
     SendToServer_StartPlaying();
 
     return;