summaryrefslogtreecommitdiff
path: root/src/game/game_core.cpp
diff options
context:
space:
mode:
authorzuu <zuu@openttd.org>2012-09-21 19:58:18 +0000
committerzuu <zuu@openttd.org>2012-09-21 19:58:18 +0000
commitf3f4c562ff0625df99782af09725391d0f1c0a8a (patch)
tree6c456062b1bf0217a16fc19e4e21f9d505baabec /src/game/game_core.cpp
parent2e1936b11cfb64f08b43e454a402b6ada276a67a (diff)
downloadopenttd-f3f4c562ff0625df99782af09725391d0f1c0a8a.tar.xz
(svn r24537) -Feature: Scripts can be suspended even if the game is still progressing, thus break-on-log now works also for Game Scripts.
Diffstat (limited to 'src/game/game_core.cpp')
-rw-r--r--src/game/game_core.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/game_core.cpp b/src/game/game_core.cpp
index f56dddf83..f32a99b27 100644
--- a/src/game/game_core.cpp
+++ b/src/game/game_core.cpp
@@ -117,6 +117,21 @@
}
}
+/* static */ void Game::Pause()
+{
+ if (Game::instance != NULL) Game::instance->Pause();
+}
+
+/* static */ void Game::Unpause()
+{
+ if (Game::instance != NULL) Game::instance->Unpause();
+}
+
+/* static */ bool Game::IsPaused()
+{
+ return Game::instance != NULL? Game::instance->IsPaused() : false;
+}
+
/* static */ void Game::NewEvent(ScriptEvent *event)
{
/* AddRef() and Release() need to be called at least once, so do it here */