mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: client: fix invalid playerinfo being accessed by renderer
This commit is contained in:
parent
1d558b33d6
commit
314672d82c
@ -147,21 +147,6 @@ qboolean CL_IsThirdPerson( void )
|
|||||||
return false;
|
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
|
CL_CreatePlaylist
|
||||||
|
@ -151,7 +151,7 @@ static player_info_t *pfnPlayerInfo( int index )
|
|||||||
if( index == -1 ) // special index for menu
|
if( index == -1 ) // special index for menu
|
||||||
return &gameui.playerinfo;
|
return &gameui.playerinfo;
|
||||||
|
|
||||||
if( index < 0 || index > cl.maxclients )
|
if( index < 0 || index >= cl.maxclients )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return &cl.players[index];
|
return &cl.players[index];
|
||||||
|
@ -748,7 +748,6 @@ void R_ClearAllDecals( void );
|
|||||||
void CL_ClearStaticEntities( void );
|
void CL_ClearStaticEntities( void );
|
||||||
qboolean S_StreamGetCurrentState( char *currentTrack, char *loopTrack, int *position );
|
qboolean S_StreamGetCurrentState( char *currentTrack, char *loopTrack, int *position );
|
||||||
struct cl_entity_s *CL_GetEntityByIndex( int index );
|
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_ServerCommand( qboolean reliable, const char *fmt, ... ) _format( 2 );
|
||||||
void CL_HudMessage( const char *pMessage );
|
void CL_HudMessage( const char *pMessage );
|
||||||
const char *CL_MsgInfo( int cmd );
|
const char *CL_MsgInfo( int cmd );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user