From caefa0b7b9deb788359e9aefdfbed043f3bd20e8 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 6 Jan 2024 21:45:26 +0300 Subject: [PATCH] engine: remove cvar r_lighting_modulate, it's some unindentifiable legacy --- engine/ref_api.h | 1 - engine/server/sv_main.c | 2 -- engine/server/sv_phys.c | 2 +- ref/gl/gl_rlight.c | 2 +- ref/soft/r_light.c | 2 +- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/engine/ref_api.h b/engine/ref_api.h index 4580522c..db47ea51 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -678,7 +678,6 @@ typedef int (*REFAPI)( int version, ref_interface_t *pFunctionTable, ref_api_t* ENGINE_SHARED_CVAR( f, r_sprite_lighting ) \ ENGINE_SHARED_CVAR( f, r_drawviewmodel ) \ ENGINE_SHARED_CVAR( f, r_glowshellfreq ) \ - ENGINE_SHARED_CVAR( f, r_lighting_modulate ) \ #define DECLARE_ENGINE_SHARED_CVAR_LIST() \ ENGINE_SHARED_CVAR_LIST( DECLARE_ENGINE_SHARED_CVAR ) diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index aaa3dea7..5a67303d 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -129,7 +129,6 @@ CVAR_DEFINE( public_server, "public", "0", 0, "change server type from private t CVAR_DEFINE_AUTO( sv_novis, "0", 0, "force to ignore server visibility" ); // disable server culling entities by vis CVAR_DEFINE( sv_pausable, "pausable", "1", FCVAR_SERVER, "allow players to pause or not" ); static CVAR_DEFINE_AUTO( timeout, "125", FCVAR_SERVER, "connection timeout" ); // seconds without any message -CVAR_DEFINE( sv_lighting_modulate, "r_lighting_modulate", "0.6", FCVAR_ARCHIVE, "lightstyles modulate scale" ); CVAR_DEFINE( sv_maxclients, "maxplayers", "1", FCVAR_LATCH, "server max capacity" ); CVAR_DEFINE_AUTO( sv_check_errors, "0", FCVAR_ARCHIVE, "check edicts for errors" ); CVAR_DEFINE_AUTO( sv_reconnect_limit, "3", FCVAR_ARCHIVE, "max reconnect attempts" ); // minimum seconds between connect messages @@ -919,7 +918,6 @@ void SV_Init( void ) Cvar_RegisterVariable( &sv_maxclients ); Cvar_RegisterVariable( &sv_check_errors ); Cvar_RegisterVariable( &public_server ); - Cvar_RegisterVariable( &sv_lighting_modulate ); Cvar_RegisterVariable( &sv_reconnect_limit ); Cvar_RegisterVariable( &sv_failuretime ); Cvar_RegisterVariable( &sv_unlag ); diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c index 8e152cb4..9e49fd42 100644 --- a/engine/server/sv_phys.c +++ b/engine/server/sv_phys.c @@ -1784,7 +1784,7 @@ static void SV_RunLightStyles( void ) lightstyle_t *ls; float scale; - scale = sv_lighting_modulate.value; + scale = 1.0f; // run lightstyles animation for( i = 0, ls = sv.lightstyles; i < MAX_LIGHTSTYLES; i++, ls++ ) diff --git a/ref/gl/gl_rlight.c b/ref/gl/gl_rlight.c index c2f208ae..5c47916f 100644 --- a/ref/gl/gl_rlight.c +++ b/ref/gl/gl_rlight.c @@ -42,7 +42,7 @@ void CL_RunLightStyles( void ) if( !WORLDMODEL ) return; - scale = r_lighting_modulate->value; + scale = 1.0f; // light animations // 'm' is normal light, 'a' is no light, 'z' is double bright diff --git a/ref/soft/r_light.c b/ref/soft/r_light.c index 07ca2c8d..6b029cd5 100644 --- a/ref/soft/r_light.c +++ b/ref/soft/r_light.c @@ -45,7 +45,7 @@ void GAME_EXPORT CL_RunLightStyles( void ) if( !WORLDMODEL ) return; - scale = 1; //r_lighting_modulate->value; + scale = 1.0f; // light animations // 'm' is normal light, 'a' is no light, 'z' is double bright