From ef6608a87a6c4da299afb66bd1cd38e461d56e75 Mon Sep 17 00:00:00 2001 From: darkrose Date: Sun, 20 Aug 2017 02:41:24 +1000 Subject: [PATCH] get multiplayer connection working again --- src/main.cpp | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 7c8bd2a..fc1d0dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1210,16 +1210,31 @@ int main(int argc, char *argv[]) /* Run game */ - if (!world_init(NULL)) { - the_game( - kill, - input, - device, - font, - password, - error_message - ); - world_exit(); + { + char* v = config_get("world.server.address"); + if (!v || !v[0]) { + if (!world_init(NULL)) { + the_game( + kill, + input, + device, + font, + password, + error_message + ); + world_exit(); + } + }else{ + the_game( + kill, + input, + device, + font, + password, + error_message + ); + config_clear("world"); + } } #if USE_AUDIO == 1 sound_stop_effects(0);