mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: client: added Host_Error for CL_EDICT_NUM (hotfix for issue #434)
This commit is contained in:
parent
37c5dfa49f
commit
f7f069a38b
@ -844,6 +844,12 @@ movevars_t *pfnGetMoveVars( void );
|
|||||||
|
|
||||||
_inline cl_entity_t *CL_EDICT_NUM( int n )
|
_inline cl_entity_t *CL_EDICT_NUM( int n )
|
||||||
{
|
{
|
||||||
|
if( !clgame.entities )
|
||||||
|
{
|
||||||
|
Host_Error( "CL_EDICT_NUM: clgame.entities is NULL\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if(( n >= 0 ) && ( n < clgame.maxEntities ))
|
if(( n >= 0 ) && ( n < clgame.maxEntities ))
|
||||||
return clgame.entities + n;
|
return clgame.entities + n;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user