Revert "Removed unnecessary comment"

This reverts commit 954e963d1a.
This commit is contained in:
Sachith Hasaranga Seneviratne
2014-03-24 11:10:43 +05:30
parent 88de3ebfb7
commit e967e9a1f9

View File

@@ -71,6 +71,13 @@ void ScriptEngine::runScript(std::string scriptName)
return;
}
// We don't want to allow the script to hang the application, e.g. with an
// infinite loop, so we'll use the line callback function to set a timeout
// that will abort the script after a certain time. Before executing the
// script the timeOut variable will be set to the time when the script must
// stop executing.
//DWORD timeOut;
//r = ctx->SetLineCallback(asFUNCTION(LineCallback), &timeOut, asCALL_CDECL);
if( r < 0 )
{
std::cout << "Failed to set the line callback function." << std::endl;
@@ -81,7 +88,7 @@ void ScriptEngine::runScript(std::string scriptName)
// Find the function for the function we want to execute.
//This is how you call a normal function with arguments
//asIScriptFunction *func = engine->GetModule(0)->GetFunctionByDecl("void func(arg1Type, arg2Type)");
//asIScriptFunction *func = engine->GetModule(0)->GetFunctionByDecl("void onTrigger(float, float)");
asIScriptFunction *func = m_engine->GetModule(0)->GetFunctionByDecl("void onTrigger()");
if( func == 0 )
{