Changeset - r19644:956473a8e0a3
[Not reviewed]
master
0 1 0
zuu - 12 years ago 2012-10-05 19:16:23
zuu@openttd.org
(svn r24575) -Add: ScriptController::Break() now also pauses the game (and not only the script)
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_controller.cpp
Show inline comments
 
@@ -54,12 +54,16 @@
 
	snprintf(log_message, sizeof(log_message), "Break: %s", message);
 
	ScriptLog::Log(ScriptLog::LOG_SQ_ERROR, log_message);
 

	
 
	/* 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)
 
{
 
	ScriptLog::Log(error_msg ? ScriptLog::LOG_SQ_ERROR : ScriptLog::LOG_SQ_INFO, message);
 
}
0 comments (0 inline, 0 general)