Changeset - r19612:b7a833e5c076
[Not reviewed]
master
0 1 0
zuu - 12 years ago 2012-09-21 21:00:32
zuu@openttd.org
(svn r24543) -Fix-ish (r24542): Removed unnecessary preprocessor directive
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_controller.cpp
Show inline comments
 
@@ -37,28 +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)
 
{
 
#ifdef ENABLE_NETWORK
 
	if (!_network_dedicated) return false;
 
#endif
 
	if (!_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)