mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 15:47:55 +00:00
ref: soft: return NULL in GetEntityByIndex and ModelHandle
This commit is contained in:
parent
b946c8455d
commit
fba3a2b67f
@ -686,11 +686,17 @@ DECLARE_ENGINE_SHARED_CVAR_LIST()
|
||||
//
|
||||
static inline cl_entity_t *CL_GetEntityByIndex( int index )
|
||||
{
|
||||
if( unlikely( index < 0 || index >= tr.max_entities || !tr.entities ))
|
||||
return NULL;
|
||||
|
||||
return &tr.entities[index];
|
||||
}
|
||||
|
||||
static inline model_t *CL_ModelHandle( int index )
|
||||
{
|
||||
if( unlikely( index < 0 || index >= gp_cl->nummodels ))
|
||||
return NULL;
|
||||
|
||||
return gp_cl->models[index];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user