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

Method OnLevelLoad

Sources/Jazz2/Scripting/LevelScriptLoader.cpp:210–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 }
209
210 void LevelScriptLoader::OnLevelLoad()
211 {
212 asIScriptFunction* func = GetMainModule()->GetFunctionByDecl("void onLevelLoad()");
213 if (func == nullptr) {
214 return;
215 }
216
217 OnBeforeScriptCall();
218 asIScriptContext* ctx = GetEngine()->RequestContext();
219
220 ctx->Prepare(func);
221 std::int32_t r = ctx->Execute();
222 if (r == asEXECUTION_EXCEPTION) {
223 AS_LOG_EXCEPTION(ctx);
224 }
225
226 GetEngine()->ReturnContext(ctx);
227 OnAfterScriptCall();
228 }
229
230 void LevelScriptLoader::OnLevelBegin()
231 {

Callers 1

OnInitializedMethod · 0.80

Calls 1

ExecuteMethod · 0.80

Tested by

no test coverage detected