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

Method OnLevelReload

Sources/Jazz2/Scripting/LevelScriptLoader.cpp:250–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248 }
249
250 void LevelScriptLoader::OnLevelReload()
251 {
252 asIScriptFunction* func = GetMainModule()->GetFunctionByDecl("void onLevelReload()");
253 if (func == nullptr) {
254 return;
255 }
256
257 OnBeforeScriptCall();
258 asIScriptContext* ctx = GetEngine()->RequestContext();
259
260 ctx->Prepare(func);
261 std::int32_t r = ctx->Execute();
262 if (r == asEXECUTION_EXCEPTION) {
263 AS_LOG_EXCEPTION(ctx);
264 }
265
266 GetEngine()->ReturnContext(ctx);
267 OnAfterScriptCall();
268 }
269
270 void LevelScriptLoader::OnLevelUpdate(float timeMult)
271 {

Callers 1

RollbackToCheckpointMethod · 0.80

Calls 1

ExecuteMethod · 0.80

Tested by

no test coverage detected