engine: server: don't show scary message about missing server library on engine startup in multiplayer capable games

This commit is contained in:
Alibek Omarov
2026-03-25 23:01:36 +05:00
parent a04bb01841
commit 2fe950b0af
5 changed files with 9 additions and 7 deletions

View File

@@ -1362,7 +1362,6 @@ qboolean UI_LoadProgs( void )
UITEXTAPI GiveTextApi;
MENUAPI GetMenuAPI;
string dllpath;
int i;
if( gameui.hInstance ) UI_UnloadProgs();

View File

@@ -478,7 +478,7 @@ qboolean SV_ProcessUserAgent( netadr_t from, const char *useragent );
//
// sv_init.c
//
qboolean SV_InitGame( void );
qboolean SV_InitGame( qboolean silent );
void SV_ActivateServer( int runPhysics );
qboolean SV_SpawnServer( const char *server, const char *startspot, qboolean background );
void SV_DeactivateServer( void );

View File

@@ -728,7 +728,7 @@ SV_InitGame
A brand new game has been started
==============
*/
qboolean SV_InitGame( void )
qboolean SV_InitGame( qboolean silent )
{
string dllpath;
@@ -742,7 +742,10 @@ qboolean SV_InitGame( void )
if( !SV_LoadProgs( dllpath ))
{
Sys_Warn( "can't initialize %s: %s\n", dllpath, COM_GetLibraryError( ));
if( !silent )
Sys_Warn( "can't initialize %s: %s\n", dllpath, COM_GetLibraryError( ));
else
Con_Printf( S_ERROR "can't initialize %s: %s\n", dllpath, COM_GetLibraryError( ));
return false; // failed to loading server.dll
}
@@ -1015,7 +1018,7 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
SV_SetupClients();
if( !SV_InitGame( ))
if( !SV_InitGame( false ))
return false;
Delta_Init(); // re-initialize delta

View File

@@ -1008,7 +1008,7 @@ void SV_Init( void )
SV_InitFilter();
SV_ClearGameState (); // delete all temporary *.hl files
SV_InitGame();
SV_InitGame( GI->gamemode != GAME_SINGLEPLAYER_ONLY );
}
/*

View File

@@ -2142,7 +2142,7 @@ qboolean SV_LoadGame( const char *pPath )
return false;
// initialize game if needs
if( !SV_InitGame( ))
if( !SV_InitGame( false ))
return false;
svs.initialized = true;