aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-12-26 16:19:09 +0100
committerest31 <MTest31@outlook.com>2015-12-29 00:40:22 +0100
commite2d54c9f9275e4f77ec33be8054621d42945f7a4 (patch)
tree049e84891dae962f614514f7c3228f500ba95a12 /src
parent8a46c5df1c1b7d7c2b46b73f973a45388a517e71 (diff)
downloadminetest-e2d54c9f9275e4f77ec33be8054621d42945f7a4.tar.gz
minetest-e2d54c9f9275e4f77ec33be8054621d42945f7a4.tar.bz2
minetest-e2d54c9f9275e4f77ec33be8054621d42945f7a4.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp4
1 files changed, 3 insertions, 1 deletions
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()