From: sapier Date: Sun, 7 Apr 2013 17:41:12 +0000 (+0200) Subject: replace Server smart pointer with conventional one to gain control over dtor call... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=cd27c8ef5df35edd2cc606291f3f7985a61d41d5;p=zefram%2Fminetest%2Fminetest_engine.git replace Server smart pointer with conventional one to gain control over dtor call order --- diff --git a/src/game.cpp b/src/game.cpp index 65feb50b..4f6eb472 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -992,6 +992,9 @@ void the_game( sound_is_dummy = true; } + Server *server = NULL; + + try{ // Event manager EventManager eventmgr; @@ -1007,9 +1010,8 @@ void the_game( /* Create server. - SharedPtr will delete it when it goes out of scope. */ - SharedPtr server; + if(address == ""){ draw_load_screen(L"Creating server...", driver, font); infostream<<"Creating server"<start(port); } - try{ do{ // Client scope (breakable do-while(0)) /* @@ -3290,10 +3291,25 @@ void the_game( L" running a different version of Minetest."; errorstream<