fixed using private level set if network game level set not found
authorHolger Schemel <info@artsoft.org>
Thu, 12 Jul 2018 19:32:31 +0000 (21:32 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 12 Jul 2018 19:32:34 +0000 (21:32 +0200)
Before, if a network client started playing a level from a level set
that is not installed for some other network client, that client did
a fallback to playing the default private level set. This caused the
network clients effectively playing completely different levels with
the input actions of the other clients, which does not make any sense.

Now, the network game is stopped for all clients in such a case.

src/network.c

index 657c796b7cfd30d7b5951ab686f82d3ba3f04a48..0b3c6a8f0b6c27be5385663fbb6311e4d3e5cd07 100644 (file)
@@ -620,8 +620,9 @@ static void Handle_OP_START_PLAYING()
   {
     Error(ERR_WARN, "no such level identifier: '%s'", new_leveldir_identifier);
 
   {
     Error(ERR_WARN, "no such level identifier: '%s'", new_leveldir_identifier);
 
-    new_leveldir = leveldir_first;
-    Error(ERR_WARN, "using default level set: '%s'", new_leveldir->identifier);
+    stop_network_game = TRUE;
+
+    return;
   }
 
   printf("OP_START_PLAYING: %d\n", buffer[0]);
   }
 
   printf("OP_START_PLAYING: %d\n", buffer[0]);