diff --git a/engine/common/common.h b/engine/common/common.h index 9a0250e4..d397ccc5 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -510,8 +510,6 @@ void Host_WriteServerConfig( const char *name ); void Host_WriteOpenGLConfig( void ); void Host_WriteVideoConfig( void ); void Host_WriteConfig( void ); -qboolean Host_IsLocalGame( void ); -qboolean Host_IsLocalClient( void ); void Host_ShutdownServer( void ); void Host_Error( const char *error, ... ) _format( 1 ); void Host_ValidateEngineFeatures( uint32_t features ); @@ -745,6 +743,18 @@ int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCom char *va( const char *format, ... ) _format( 1 ); qboolean CRC32_MapFile( dword *crcvalue, const char *filename, qboolean multiplayer ); +static inline qboolean Host_IsLocalGame( void ) +{ + if( SV_Active( )) + return SV_GetMaxClients() == 1 ? true : false; + return CL_GetMaxClients() == 1 ? true : false; +} + +static inline qboolean Host_IsLocalClient( void ) +{ + return CL_Initialized( ) && SV_Initialized( ) ? true : false; +} + // soundlib shared exports qboolean S_Init( void ); void S_Shutdown( void ); diff --git a/engine/common/host.c b/engine/common/host.c index 3ad689a3..7494f3f6 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -514,33 +514,6 @@ static void Host_Minimize_f( void ) #endif } -/* -================= -Host_IsLocalGame - -singleplayer game detect -================= -*/ -qboolean Host_IsLocalGame( void ) -{ - if( SV_Active( )) - { - return ( SV_GetMaxClients() == 1 ) ? true : false; - } - else - { - return ( CL_GetMaxClients() == 1 ) ? true : false; - } -} - -qboolean Host_IsLocalClient( void ) -{ - // only the local client have the active server - if( CL_Initialized( ) && SV_Initialized( )) - return true; - return false; -} - /* ================= Host_RegisterDecal