MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / Initialize

Method Initialize

Code/CryEngine/CryEntitySystem/DynamicResponseProxy.cpp:20–34  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

18
19//////////////////////////////////////////////////////////////////////////
20void CDynamicResponseProxy::Initialize(SComponentInitializer const& init)
21{
22 const char* szEntityName = init.m_pEntity->GetName();
23 m_pResponseActor = gEnv->pDynamicResponseSystem->GetResponseActor(szEntityName);
24 if (m_pResponseActor)
25 {
26 CryWarning(VALIDATOR_MODULE_DRS, VALIDATOR_ERROR_DBGBRK, "DrsActor with name '%s' already exists. Actors need to have unique names to be referenced correctly", szEntityName);
27 }
28 else
29 {
30 m_pResponseActor = gEnv->pDynamicResponseSystem->CreateResponseActor(szEntityName, init.m_pEntity->GetId());
31 }
32 SET_DRS_USER_SCOPED("DrsProxy Initialize");
33 m_pResponseActor->GetLocalVariables()->SetVariableValue("Name", CHashedString(szEntityName));
34}
35
36//////////////////////////////////////////////////////////////////////////
37void CDynamicResponseProxy::Reload(IEntity* pEntity, SEntitySpawnParams& params)

Callers

nothing calls this directly

Calls 8

CryWarningFunction · 0.85
CHashedStringClass · 0.85
GetNameMethod · 0.45
GetResponseActorMethod · 0.45
CreateResponseActorMethod · 0.45
GetIdMethod · 0.45
SetVariableValueMethod · 0.45
GetLocalVariablesMethod · 0.45

Tested by

no test coverage detected