From: est31 Date: Sat, 26 Dec 2015 15:19:09 +0000 (+0100) Subject: shutdown when requested from lua in singleplayer too X-Git-Tag: 0.4.14~360 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e2d54c9f9275e4f77ec33be8054621d42945f7a4;p=oweals%2Fminetest.git shutdown when requested from lua in singleplayer too Before, minetest.request_shutdown didn't shut down singleplayer instances or server instances from the server tab. This commit fixes this. Fixes #3489. --- diff --git a/src/game.cpp b/src/game.cpp index 3f025f6de..25424fa26 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1816,7 +1816,9 @@ void Game::run() && client->checkPrivilege("fast"); #endif - while (device->run() && !(*kill || g_gamecallback->shutdown_requested)) { + while (device->run() + && !(*kill || g_gamecallback->shutdown_requested + || server->getShutdownRequested())) { /* Must be called immediately after a device->run() call because it * uses device->getTimer()->getTime()