mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: simplify IsQuakeCompatible by enforcing QUAKE_COMPATIBLE feature flag when Quake demo starts
This commit is contained in:
@@ -213,6 +213,7 @@ static void CL_ParseQuakeServerInfo( sizebuf_t *msg )
|
||||
clgame.maxEntities = bound( 600, clgame.maxEntities, MAX_EDICTS );
|
||||
clgame.maxModels = MAX_MODELS;
|
||||
Q_strncpy( clgame.maptitle, MSG_ReadString( msg ), sizeof( clgame.maptitle ));
|
||||
Host_ValidateEngineFeatures( ENGINE_FEATURES_MASK, ENGINE_QUAKE_COMPATIBLE );
|
||||
|
||||
// Re-init hud video, especially if we changed game directories
|
||||
clgame.dllFuncs.pfnVidInit();
|
||||
|
||||
@@ -564,7 +564,11 @@ qboolean Sound_SupportedFileFormat( const char *fileext );
|
||||
//
|
||||
typedef void( *pfnChangeGame )( const char *progname );
|
||||
|
||||
qboolean Host_IsQuakeCompatible( void );
|
||||
static inline qboolean Host_IsQuakeCompatible( void )
|
||||
{
|
||||
return FBitSet( host.features, ENGINE_QUAKE_COMPATIBLE ) ? true : false;
|
||||
}
|
||||
|
||||
void Host_ShutdownWithReason( const char *reason );
|
||||
int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGame, pfnChangeGame func );
|
||||
void Host_EndGame( qboolean abort, const char *message, ... ) FORMAT_CHECK( 2 );
|
||||
|
||||
@@ -296,27 +296,6 @@ void Host_ValidateEngineFeatures( uint32_t mask, uint32_t features )
|
||||
host.features = features;
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
Host_IsQuakeCompatible
|
||||
|
||||
==============
|
||||
*/
|
||||
qboolean Host_IsQuakeCompatible( void )
|
||||
{
|
||||
// feature set
|
||||
if( FBitSet( host.features, ENGINE_QUAKE_COMPATIBLE ))
|
||||
return true;
|
||||
|
||||
#if !XASH_DEDICATED
|
||||
// quake demo playing
|
||||
if( cls.demoplayback == DEMO_QUAKE1 )
|
||||
return true;
|
||||
#endif // XASH_DEDICATED
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Host_EndGame
|
||||
|
||||
Reference in New Issue
Block a user