MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / GetEntity

Function GetEntity

extensions/structs/natives.cpp:49–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49inline edict_t *GetEntity(cell_t num, CBaseEntity **pData)
50{
51 edict_t *pEdict = engine->PEntityOfEntIndex(num);
52 if (!pEdict || pEdict->IsFree())
53 {
54 return NULL;
55 }
56
57 IServerUnknown *pUnk;
58 if ((pUnk=pEdict->GetUnknown()) == NULL)
59 {
60 return NULL;
61 }
62 *pData = pUnk->GetBaseEntity();
63 return pEdict;
64}
65
66int CheckBaseHandle(CBaseHandle &hndl)
67{

Callers 1

CheckBaseHandleFunction · 0.70

Calls 1

IsFreeMethod · 0.80

Tested by

no test coverage detected