# HG changeset patch # User rubidium # Date 1281873500 0 # Node ID 519a31ac7e5b8fba9f51e5c14402cfd1410a50db # Parent 2c000e996b9f90f1ebf9b39d936aed49e66344ee (svn r20497) -Fix [FS#3960]: non-dedicated servers failing to load a game caused the introgame to be the server's game causing desyncs when people tried to join diff --git a/src/network/network.cpp b/src/network/network.cpp --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -937,6 +937,9 @@ DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0); NetworkClose(); + + /* Reinitialize the UDP stack, i.e. close all existing connections. */ + NetworkUDPInitialize(); } /** diff --git a/src/openttd.cpp b/src/openttd.cpp --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -877,6 +877,7 @@ case SL_OK: return true; case SL_REINIT: +#ifdef ENABLE_NETWORK if (_network_dedicated) { /* * We need to reinit a network map... @@ -888,6 +889,11 @@ MakeNewGame(false, true); return false; } + if (_network_server) { + /* We can't load the intro game as server, so disconnect first. */ + NetworkDisconnect(); + } +#endif /* ENABLE_NETWORK */ switch (ogm) { default: