changeset 19666:aae83f8e5b72 draft

(svn r24575) -Add: ScriptController::Break() now also pauses the game (and not only the script)
author zuu <zuu@openttd.org>
date Fri, 05 Oct 2012 19:16:23 +0000
parents a5db983a0ac0
children eaf0fcf9aae8
files src/script/api/script_controller.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/script/api/script_controller.cpp
+++ b/src/script/api/script_controller.cpp
@@ -57,6 +57,10 @@
 	/* Inform script developer that his script has been paused and
 	 * needs manual action to continue. */
 	ShowAIDebugWindow(ScriptObject::GetRootCompany());
+
+	if ((_pause_mode & PM_PAUSED_NORMAL) == PM_UNPAUSED) {
+		ScriptObject::DoCommand(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
+	}
 }
 
 /* static */ void ScriptController::Print(bool error_msg, const char *message)