engine: CL_IsPlayerIndex macro

This commit is contained in:
Crow-bar
2022-06-10 11:19:16 +03:00
parent 12889494e0
commit db9e82cdec
2 changed files with 6 additions and 0 deletions

View File

@@ -33,10 +33,12 @@ CL_IsPlayerIndex
detect player entity
==================
*/
#if XASH_EXT_OPT != 2
qboolean CL_IsPlayerIndex( int idx )
{
return ( idx >= 1 && idx <= cl.maxclients );
}
#endif
/*
=========================================================================

View File

@@ -954,7 +954,11 @@ void CL_ProcessPlayerState( int playerindex, entity_state_t *state );
void CL_ComputePlayerOrigin( cl_entity_t *clent );
void CL_ProcessPacket( frame_t *frame );
void CL_MoveThirdpersonCamera( void );
#if XASH_EXT_OPT == 2
#define CL_IsPlayerIndex( idx ) (( idx ) >= 1 && ( idx ) <= cl.maxclients )
#else
qboolean CL_IsPlayerIndex( int idx );
#endif
void CL_SetIdealPitch( void );
void CL_EmitEntities( void );