Browse Source

engine: print all supported and enabled features

pull/2/head
Alibek Omarov 7 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 )
host.features &= legacy ? ENGINE_LEGACY_FEATURES_MASK : ENGINE_FEATURES_MASK; host.features &= legacy ? ENGINE_LEGACY_FEATURES_MASK : ENGINE_FEATURES_MASK;
if( !Host_IsLocalGame( )) if( !Host_IsLocalGame( ))
Host_PrintEngineFeatures(); Host_PrintEngineFeatures( host.features );
if( !legacy ) if( !legacy )
{ {

2
engine/common/common.h

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

33
engine/common/host.c

@ -190,22 +190,27 @@ void Host_ShutdownServer( void )
Host_PrintEngineFeatures Host_PrintEngineFeatures
================ ================
*/ */
void Host_PrintEngineFeatures( void ) void Host_PrintEngineFeatures( int features )
{ {
if( FBitSet( host.features, ENGINE_WRITE_LARGE_COORD )) const char *features_str[] =
Con_Reportf( "^3EXT:^7 big world support enabled\n" ); {
"Big World Support",
if( FBitSet( host.features, ENGINE_LOAD_DELUXEDATA )) "Quake Compatibility",
Con_Reportf( "^3EXT:^7 deluxemap support enabled\n" ); "Deluxemap Support",
"Improved MOVETYPE_PUSH",
if( FBitSet( host.features, ENGINE_PHYSICS_PUSHER_EXT )) "Large Lightmaps",
Con_Reportf( "^3EXT:^7 Improved MOVETYPE_PUSH is used\n" ); "Stupid Quake Bug Compensation",
"Improved Trace Line",
if( FBitSet( host.features, ENGINE_LARGE_LIGHTMAPS )) "Studio MOVETYPE_STEP Lerping",
Con_Reportf( "^3EXT:^7 Large lightmaps enabled\n" ); "Linear Gamma Space"
};
int i;
if( FBitSet( host.features, ENGINE_COMPENSATE_QUAKE_BUG )) for( i = 0; i < ARRAYSIZE( features_str ); i++ )
Con_Reportf( "^3EXT:^7 Compensate quake bug enabled\n" ); {
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 )
{ {
// grab common engine features (it will be shared across the network) // grab common engine features (it will be shared across the network)
host.features = svgame.physFuncs.SV_CheckFeatures() & ENGINE_FEATURES_MASK; host.features = svgame.physFuncs.SV_CheckFeatures() & ENGINE_FEATURES_MASK;
Host_PrintEngineFeatures (); Host_PrintEngineFeatures( host.features );
} }
return true; return true;
} }

Loading…
Cancel
Save