MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / ScriptCallBack

Function ScriptCallBack

ogsr_engine/xrGame/script_entity.cpp:564–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562}
563
564void ScriptCallBack(CBlend* B)
565{
566 CScriptEntity* l_tpScriptMonster = static_cast<CScriptEntity*>(B->CallbackParam);
567 VERIFY(l_tpScriptMonster);
568 if (l_tpScriptMonster->GetCurrentAction() && !B->bone_or_part)
569 {
570 if (!l_tpScriptMonster->GetCurrentAction()->m_tAnimationAction.m_bCompleted)
571 l_tpScriptMonster->object().callback(GameObject::eActionTypeAnimation)(l_tpScriptMonster->object().lua_game_object(), u32(eActionTypeAnimation));
572
573 l_tpScriptMonster->m_tpScriptAnimation.invalidate();
574 l_tpScriptMonster->GetCurrentAction()->m_tAnimationAction.m_bCompleted = true;
575 if (l_tpScriptMonster->GetActionCount())
576 l_tpScriptMonster->ProcessScripts();
577 }
578}
579
580bool CScriptEntity::bfScriptAnimation()
581{

Callers

nothing calls this directly

Calls 8

GetCurrentActionMethod · 0.80
lua_game_objectMethod · 0.80
GetActionCountMethod · 0.80
u32Enum · 0.70
callbackMethod · 0.45
objectMethod · 0.45
invalidateMethod · 0.45
ProcessScriptsMethod · 0.45

Tested by

no test coverage detected