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

Method CreateEntityScriptBinding

CrySystem/ScriptBinding.cpp:118–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void CSystem::CreateEntityScriptBinding(IEntity *ent)
119{
120 CScriptObjectEntity *pSEntity = new CScriptObjectEntity();
121 pSEntity->Create(m_pScriptSystem, this);
122 assert(pSEntity->GetScriptObject());
123 if (ent->GetContainer()){
124 IScriptObject *pObj=ent->GetContainer()->GetScriptObject();
125 if(pObj)
126 pSEntity->SetContainer(pObj);
127 }
128 assert(pSEntity->GetScriptObject());
129 pSEntity->SetEntity(ent);
130 assert(pSEntity->GetScriptObject());
131 ent->SetScriptObject(pSEntity->GetScriptObject());
132 assert(pSEntity->GetScriptObject());
133 assert(ent->GetScriptObject());
134}

Callers 1

OnSpawnMethod · 0.80

Calls 6

CreateMethod · 0.45
GetScriptObjectMethod · 0.45
GetContainerMethod · 0.45
SetContainerMethod · 0.45
SetEntityMethod · 0.45
SetScriptObjectMethod · 0.45

Tested by

no test coverage detected