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

Method GetEntityByName

CrySystem/ScriptObjectSystem.cpp:947–962  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// ![DEBUG ONLY]return an entity by his name */

Source from the content-addressed store, hash-verified

945/*![DEBUG ONLY]return an entity by his name
946*/
947int CScriptObjectSystem::GetEntityByName(IFunctionHandler *pH)
948{
949 CHECK_PARAMETERS(1);
950 IEntity *pEntity;
951 IScriptObject *pObject;
952 const char *sEntityName;
953 pH->GetParam(1,sEntityName);
954 pEntity=m_pEntitySystem->GetEntity(sEntityName);
955 if(pEntity)
956 {
957 pObject=pEntity->GetScriptObject();
958 return pH->EndFunction(pObject);
959 }
960 return pH->EndFunctionNull();
961
962}
963/////////////////////////////////////////////////////////////////////////////////
964/////////////////////////////////////////////////////////////////////////////////
965/*int CScriptObjectSystem::RemoveTexture(IFunctionHandler *pH)

Callers

nothing calls this directly

Calls 5

EndFunctionMethod · 0.80
EndFunctionNullMethod · 0.80
GetParamMethod · 0.45
GetEntityMethod · 0.45
GetScriptObjectMethod · 0.45

Tested by

no test coverage detected