mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-10 06:02:10 +08:00
engine: client: fix invalid playerinfo being accessed by renderer
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user