MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / SetAnimationEvent

Method SetAnimationEvent

CrySystem/ScriptObjectEntity.cpp:2981–2995  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

2979
2980//////////////////////////////////////////////////////////////////////////
2981int CScriptObjectEntity::SetAnimationEvent(IFunctionHandler *pH)
2982{
2983 CHECK_PARAMETERS(2);
2984 int idSource;
2985 const char *sAnimation;
2986 pH->GetParam(1,idSource);
2987 pH->GetParam(2,sAnimation);
2988 IEntity *pSource=m_pEntitySystem->GetEntity(idSource);
2989 if(!pSource)
2990 pH->EndFunction();
2991 IEntityCharacter *pCharacter=pSource->GetCharInterface();
2992 ICryCharInstance* pCryCharacter=pCharacter->GetCharacter(0);
2993 pCryCharacter->AddAnimationEventSink(sAnimation,m_pEntity);
2994 return pH->EndFunction();
2995}
2996
2997//////////////////////////////////////////////////////////////////////////
2998int CScriptObjectEntity::SetAnimationKeyEvent(IFunctionHandler *pH)

Callers

nothing calls this directly

Calls 6

EndFunctionMethod · 0.80
GetCharInterfaceMethod · 0.80
AddAnimationEventSinkMethod · 0.80
GetParamMethod · 0.45
GetEntityMethod · 0.45
GetCharacterMethod · 0.45

Tested by

no test coverage detected