MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / stopAllFunc

Function stopAllFunc

TheForceEngine/TFE_ForceScript/forceScript.cpp:679–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677 }
678
679 void stopAllFunc()
680 {
681 if (s_engine)
682 {
683 const s32 count = (s32)s_scriptThreads.size();
684 ScriptThread* thread = s_scriptThreads.data();
685
686 for (s32 i = 0; i < count; i++)
687 {
688 if (thread[i].asContext == nullptr) { continue; }
689
690 asIScriptContext* context = thread[i].asContext;
691 context->Abort();
692 s_engine->ReturnContext(context);
693 }
694 }
695 // Take this opportunity to defrag.
696 s_scriptThreads.clear();
697 s_freeThreads.clear();
698 }
699
700 void* getEngine()
701 {

Callers 2

destroyFunction · 0.85
resetFunction · 0.85

Calls 5

dataMethod · 0.80
AbortMethod · 0.80
ReturnContextMethod · 0.80
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected