diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index f7e6d1dc..1453d859 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -147,21 +147,6 @@ qboolean CL_IsThirdPerson( void ) return false; } -/* -==================== -CL_GetPlayerInfo - -get player info by render request -==================== -*/ -player_info_t *CL_GetPlayerInfo( int playerIndex ) -{ - if( playerIndex < 0 || playerIndex >= cl.maxclients ) - return NULL; - - return &cl.players[playerIndex]; -} - /* ==================== CL_CreatePlaylist diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index 57388705..e71dc5ac 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -151,7 +151,7 @@ static player_info_t *pfnPlayerInfo( int index ) if( index == -1 ) // special index for menu return &gameui.playerinfo; - if( index < 0 || index > cl.maxclients ) + if( index < 0 || index >= cl.maxclients ) return NULL; return &cl.players[index]; diff --git a/engine/common/common.h b/engine/common/common.h index f70337e2..2ce2b327 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -748,7 +748,6 @@ void R_ClearAllDecals( void ); void CL_ClearStaticEntities( void ); qboolean S_StreamGetCurrentState( char *currentTrack, char *loopTrack, int *position ); struct cl_entity_s *CL_GetEntityByIndex( int index ); -struct player_info_s *CL_GetPlayerInfo( int playerIndex ); void CL_ServerCommand( qboolean reliable, const char *fmt, ... ) _format( 2 ); void CL_HudMessage( const char *pMessage ); const char *CL_MsgInfo( int cmd );