mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-25 14:24:45 +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_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
|
#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
|
#endif//FEATURES_H
|
||||||
|
@ -904,6 +904,7 @@ void CL_ParseServerData( sizebuf_t *msg, qboolean legacy )
|
|||||||
background = MSG_ReadOneBit( msg );
|
background = MSG_ReadOneBit( msg );
|
||||||
Q_strncpy( gamefolder, MSG_ReadString( msg ), sizeof( gamefolder ));
|
Q_strncpy( gamefolder, MSG_ReadString( msg ), sizeof( gamefolder ));
|
||||||
host.features = (uint)MSG_ReadLong( msg );
|
host.features = (uint)MSG_ReadLong( msg );
|
||||||
|
host.features &= ENGINE_FEATURES_MASK;
|
||||||
|
|
||||||
if( !legacy )
|
if( !legacy )
|
||||||
{
|
{
|
||||||
|
@ -2139,7 +2139,7 @@ qboolean SV_InitPhysicsAPI( void )
|
|||||||
if( svgame.physFuncs.SV_CheckFeatures != NULL )
|
if( svgame.physFuncs.SV_CheckFeatures != NULL )
|
||||||
{
|
{
|
||||||
// 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();
|
host.features = svgame.physFuncs.SV_CheckFeatures() & ENGINE_FEATURES_MASK;
|
||||||
Host_PrintEngineFeatures ();
|
Host_PrintEngineFeatures ();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user