Browse Source

engine: add missing HPAK_CheckSize/Integrity calls

pull/2/head
Alibek Omarov 2 years ago
parent
commit
c24a1fafc5
  1. 2
      engine/client/cl_parse.c
  2. 2
      engine/common/host.c
  3. 3
      engine/server/sv_init.c

2
engine/client/cl_parse.c

@ -851,6 +851,8 @@ void CL_ParseServerData( sizebuf_t *msg, qboolean legacy ) @@ -851,6 +851,8 @@ void CL_ParseServerData( sizebuf_t *msg, qboolean legacy )
qboolean background;
int i;
HPAK_CheckSize( CUSTOM_RES_PATH );
Con_Reportf( "%s packet received.\n", legacy ? "Legacy serverdata" : "Serverdata" );
cls.timestart = Sys_DoubleTime();

2
engine/common/host.c

@ -1213,6 +1213,8 @@ int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGa @@ -1213,6 +1213,8 @@ int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGa
}
else Cmd_AddRestrictedCommand( "minimize", Host_Minimize_f, "minimize main window to tray" );
HPAK_CheckIntegrity( CUSTOM_RES_PATH );
host.errorframe = 0;
// post initializations

3
engine/server/sv_init.c

@ -945,6 +945,9 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba @@ -945,6 +945,9 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
current_skill = bound( 0, current_skill, 3 );
Cvar_SetValue( "skill", (float)current_skill );
// enforce hpk_maxsize
HPAK_CheckSize( CUSTOM_RES_PATH );
// force normal player collisions for single player
if( svs.maxclients == 1 )
Cvar_SetValue( "sv_clienttrace", 1 );

Loading…
Cancel
Save