Changeset - r19628:9313ddb10693
[Not reviewed]
master
0 1 0
zuu - 12 years ago 2012-09-26 20:16:57
zuu@openttd.org
(svn r24559) -Fix (24542): Blocking script debug on non-dedicated servers is a not too much
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_controller.cpp
Show inline comments
 
@@ -37,25 +37,25 @@
 
	}
 

	
 
	if (ticks <= 0) {
 
		ScriptLog::Warning("Sleep() value should be > 0. Assuming value 1.");
 
		ticks = 1;
 
	}
 

	
 
	throw Script_Suspend(ticks, NULL);
 
}
 

	
 
/* static */ bool ScriptController::Break(const char* message)
 
{
 
	if (!_network_dedicated || !_settings_client.gui.ai_developer_tools) return false;
 
	if (_network_dedicated || !_settings_client.gui.ai_developer_tools) return false;
 

	
 
	ScriptObject::GetActiveInstance()->Pause();
 

	
 
	char log_message[1024];
 
	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());
 

	
 
	return true;
0 comments (0 inline, 0 general)