diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index fe0c5e812..de3798db7 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -30,10 +30,10 @@ Networking::Networking(RakNet::RakPeerInterface *peer) controller->SetStream(0, &bsOut); // set send stream - Script::Call(); - running = true; exitCode = 0; + + Script::Call(); } Networking::~Networking() @@ -42,6 +42,7 @@ Networking::~Networking() sThis = 0; delete controller; + LOG_QUIT(); } void Networking::Update(RakNet::Packet *packet) @@ -411,7 +412,6 @@ void Networking::StopServer(int code) { running = false; exitCode = code; - } int Networking::MainLoop() diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index e8daa0e5d..f5946c64d 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -202,8 +202,6 @@ int main(int argc, char *argv[]) if (code == 0) LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Quitting peacefully."); - LOG_QUIT(); - // Restore cout and cerr std::cout.rdbuf(cout_rdbuf); std::cerr.rdbuf(cerr_rdbuf);