engine: client: implement errormsg, secure client by checking server IP address we're connected to

This commit is contained in:
Alibek Omarov
2019-07-13 20:54:16 +03:00
parent 4e4a9827b1
commit 9662ab106f
7 changed files with 150 additions and 38 deletions
+1 -1
View File
@@ -851,7 +851,6 @@ qboolean CL_IsInConsole( void );
qboolean CL_IsThirdPerson( void );
qboolean CL_IsIntermission( void );
qboolean CL_Initialized( void );
void CL_WarnLostSplitPacket( void );
char *CL_Userinfo( void );
void CL_LegacyUpdateInfo( void );
void CL_CharEvent( int key );
@@ -952,6 +951,7 @@ void GL_FreeImage( const char *name );
void VID_InitDefaultResolution( void );
void VID_Init( void );
void UI_SetActiveMenu( qboolean fActive );
void UI_ShowConnectionWarning( void );
void Cmd_Null_f( void );
// soundlib shared exports
+1 -1
View File
@@ -327,7 +327,7 @@ void CL_ClearStaticEntities( void )
}
void CL_WarnLostSplitPacket( void )
void UI_ShowConnectionWarning( void )
{
}
+1 -1
View File
@@ -140,7 +140,7 @@ qboolean NetSplit_GetLong( netsplit_t *ns, netadr_t *from, byte *data, size_t *l
// warn if previous packet not received
if( p->received < p->count )
{
CL_WarnLostSplitPacket();
UI_ShowConnectionWarning();
Con_Reportf( S_WARN "NetSplit_GetLong: lost packet %d\n", p->id );
}