| 47 | } |
| 48 | |
| 49 | inline 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 | |
| 66 | int CheckBaseHandle(CBaseHandle &hndl) |
| 67 | { |
no test coverage detected