MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / OnLevelBegin

Method OnLevelBegin

Sources/Jazz2/Scripting/LevelScriptLoader.cpp:230–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228 }
229
230 void LevelScriptLoader::OnLevelBegin()
231 {
232 asIScriptFunction* func = GetMainModule()->GetFunctionByDecl("void onLevelBegin()");
233 if (func == nullptr) {
234 return;
235 }
236
237 OnBeforeScriptCall();
238 asIScriptContext* ctx = GetEngine()->RequestContext();
239
240 ctx->Prepare(func);
241 std::int32_t r = ctx->Execute();
242 if (r == asEXECUTION_EXCEPTION) {
243 AS_LOG_EXCEPTION(ctx);
244 }
245
246 GetEngine()->ReturnContext(ctx);
247 OnAfterScriptCall();
248 }
249
250 void LevelScriptLoader::OnLevelReload()
251 {

Callers 1

ProcessEventsMethod · 0.80

Calls 1

ExecuteMethod · 0.80

Tested by

no test coverage detected