mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 07:37:52 +00:00
engine: add mask to sanitize possible engine features bits
This commit is contained in:
parent
643bec4071
commit
d41a80bc2c
@ -27,4 +27,16 @@ GNU General Public License for more details.
|
||||
#define ENGINE_COMPUTE_STUDIO_LERP (1<<7) // enable MOVETYPE_STEP lerping back in engine
|
||||
#define ENGINE_LINEAR_GAMMA_SPACE (1<<8) // disable influence of gamma/brightness cvars to textures/lightmaps, for mods with custom renderer
|
||||
|
||||
// adjust the mask when features will be added or removed
|
||||
#define ENGINE_FEATURES_MASK \
|
||||
( ENGINE_WRITE_LARGE_COORD \
|
||||
| ENGINE_QUAKE_COMPATIBLE \
|
||||
| ENGINE_LOAD_DELUXEDATA \
|
||||
| ENGINE_PHYSICS_PUSHER_EXT \
|
||||
| ENGINE_LARGE_LIGHTMAPS \
|
||||
| ENGINE_COMPENSATE_QUAKE_BUG \
|
||||
| ENGINE_IMPROVED_LINETRACE \
|
||||
| ENGINE_COMPUTE_STUDIO_LERP \
|
||||
| ENGINE_LINEAR_GAMMA_SPACE )
|
||||
|
||||
#endif//FEATURES_H
|
||||
|
@ -904,6 +904,7 @@ void CL_ParseServerData( sizebuf_t *msg, qboolean legacy )
|
||||
background = MSG_ReadOneBit( msg );
|
||||
Q_strncpy( gamefolder, MSG_ReadString( msg ), sizeof( gamefolder ));
|
||||
host.features = (uint)MSG_ReadLong( msg );
|
||||
host.features &= ENGINE_FEATURES_MASK;
|
||||
|
||||
if( !legacy )
|
||||
{
|
||||
|
@ -2139,7 +2139,7 @@ qboolean SV_InitPhysicsAPI( void )
|
||||
if( svgame.physFuncs.SV_CheckFeatures != NULL )
|
||||
{
|
||||
// grab common engine features (it will be shared across the network)
|
||||
host.features = svgame.physFuncs.SV_CheckFeatures();
|
||||
host.features = svgame.physFuncs.SV_CheckFeatures() & ENGINE_FEATURES_MASK;
|
||||
Host_PrintEngineFeatures ();
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user