Browse Source

engine: print all supported and enabled features

pull/2/head
Alibek Omarov 12 months ago
parent
commit
96f7f5457d
  1. 2
      engine/client/cl_parse.c
  2. 2
      engine/common/common.h
  3. 33
      engine/common/host.c
  4. 2
      engine/server/sv_phys.c

2
engine/client/cl_parse.c

@ -907,7 +907,7 @@ void CL_ParseServerData( sizebuf_t *msg, qboolean legacy ) @@ -907,7 +907,7 @@ void CL_ParseServerData( sizebuf_t *msg, qboolean legacy )
host.features &= legacy ? ENGINE_LEGACY_FEATURES_MASK : ENGINE_FEATURES_MASK;
if( !Host_IsLocalGame( ))
Host_PrintEngineFeatures();
Host_PrintEngineFeatures( host.features );
if( !legacy )
{

2
engine/common/common.h

@ -552,7 +552,7 @@ qboolean Host_IsLocalGame( void ); @@ -552,7 +552,7 @@ qboolean Host_IsLocalGame( void );
qboolean Host_IsLocalClient( void );
void Host_ShutdownServer( void );
void Host_Error( const char *error, ... ) _format( 1 );
void Host_PrintEngineFeatures( void );
void Host_PrintEngineFeatures( int features );
void Host_Frame( float time );
void Host_InitDecals( void );
void Host_Credits( void );

33
engine/common/host.c

@ -190,22 +190,27 @@ void Host_ShutdownServer( void ) @@ -190,22 +190,27 @@ void Host_ShutdownServer( void )
Host_PrintEngineFeatures
================
*/
void Host_PrintEngineFeatures( void )
void Host_PrintEngineFeatures( int features )
{
if( FBitSet( host.features, ENGINE_WRITE_LARGE_COORD ))
Con_Reportf( "^3EXT:^7 big world support enabled\n" );
if( FBitSet( host.features, ENGINE_LOAD_DELUXEDATA ))
Con_Reportf( "^3EXT:^7 deluxemap support enabled\n" );
if( FBitSet( host.features, ENGINE_PHYSICS_PUSHER_EXT ))
Con_Reportf( "^3EXT:^7 Improved MOVETYPE_PUSH is used\n" );
if( FBitSet( host.features, ENGINE_LARGE_LIGHTMAPS ))
Con_Reportf( "^3EXT:^7 Large lightmaps enabled\n" );
const char *features_str[] =
{
"Big World Support",
"Quake Compatibility",
"Deluxemap Support",
"Improved MOVETYPE_PUSH",
"Large Lightmaps",
"Stupid Quake Bug Compensation",
"Improved Trace Line",
"Studio MOVETYPE_STEP Lerping",
"Linear Gamma Space"
};
int i;
if( FBitSet( host.features, ENGINE_COMPENSATE_QUAKE_BUG ))
Con_Reportf( "^3EXT:^7 Compensate quake bug enabled\n" );
for( i = 0; i < ARRAYSIZE( features_str ); i++ )
{
if( FBitSet( features, BIT( i )))
Con_Reportf( "^3EXT:^7 %s is enabled\n", features_str[i] );
}
}
/*

2
engine/server/sv_phys.c

@ -2140,7 +2140,7 @@ qboolean SV_InitPhysicsAPI( void ) @@ -2140,7 +2140,7 @@ qboolean SV_InitPhysicsAPI( void )
{
// grab common engine features (it will be shared across the network)
host.features = svgame.physFuncs.SV_CheckFeatures() & ENGINE_FEATURES_MASK;
Host_PrintEngineFeatures ();
Host_PrintEngineFeatures( host.features );
}
return true;
}

Loading…
Cancel
Save