MCPcopy Create free account
hub / github.com/Try/OpenGothic / invokeState

Method invokeState

game/game/gamescript.cpp:892–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890 }
891
892int GameScript::invokeState(Daedalus::GEngineClasses::C_Npc* hnpc, Daedalus::GEngineClasses::C_Npc* oth, const char *name) {
893 auto& dat = vm.getDATFile();
894 auto id = dat.getSymbolIndexByName(name);
895 if(id==size_t(-1))
896 return 0;
897
898 ScopeVar self (vm, vm.globalSelf(), hnpc, Daedalus::IC_Npc);
899 ScopeVar other(vm, vm.globalOther(), oth, Daedalus::IC_Npc);
900 return runFunction(id);
901 }
902
903int GameScript::invokeState(Npc* npc, Npc* oth, Npc* vic, ScriptFn fn) {
904 if(!fn.isValid())

Callers 4

clearStateMethod · 0.80
tickRoutineMethod · 0.80
perceptionProcessMethod · 0.80
excRoutineMethod · 0.80

Calls 6

isPlayerMethod · 0.80
setOtherMethod · 0.80
isValidMethod · 0.45
playerMethod · 0.45
getMethod · 0.45
handleMethod · 0.45

Tested by

no test coverage detected