From a2065cae4bed0648cd2c95ca7de8cf78ba2376de Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 30 Jan 2019 20:21:00 +0100 Subject: [PATCH] - fixed: RecreateAllAttachedLights must activate the lights it creates. This also removes the gl_attachedlights CVAR because with the new management this doesn't really work anymore. --- src/g_shared/a_dynlight.cpp | 3 +-- src/g_shared/a_dynlight.h | 1 - src/hwrenderer/utility/hw_cvars.h | 1 - wadsrc/static/menudef.txt | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/g_shared/a_dynlight.cpp b/src/g_shared/a_dynlight.cpp index 1510fc834..4c57648c4 100644 --- a/src/g_shared/a_dynlight.cpp +++ b/src/g_shared/a_dynlight.cpp @@ -75,8 +75,6 @@ CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN else AActor::DeleteAllAttachedLights(); } -CVAR (Bool, gl_attachedlights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); - //========================================================================== // //========================================================================== @@ -859,6 +857,7 @@ void AActor::RecreateAllAttachedLights() if (a->IsKindOf(NAME_DynamicLight)) { ::AttachLight(a); + ::ActivateLight(a); } else { diff --git a/src/g_shared/a_dynlight.h b/src/g_shared/a_dynlight.h index 7b0c47956..0d454ab05 100644 --- a/src/g_shared/a_dynlight.h +++ b/src/g_shared/a_dynlight.h @@ -6,7 +6,6 @@ EXTERN_CVAR(Bool, r_dynlights) EXTERN_CVAR(Bool, gl_lights) -EXTERN_CVAR(Bool, gl_attachedlights) struct side_t; struct seg_t; diff --git a/src/hwrenderer/utility/hw_cvars.h b/src/hwrenderer/utility/hw_cvars.h index 8e4ebbca8..1f08a4722 100644 --- a/src/hwrenderer/utility/hw_cvars.h +++ b/src/hwrenderer/utility/hw_cvars.h @@ -16,7 +16,6 @@ EXTERN_CVAR(Bool, gl_usefb) EXTERN_CVAR(Int, gl_weaponlight) EXTERN_CVAR (Bool, gl_lights); -EXTERN_CVAR (Bool, gl_attachedlights); EXTERN_CVAR (Bool, gl_light_sprites); EXTERN_CVAR (Bool, gl_light_particles); diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index b25b3b5b0..6633265f2 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -2260,7 +2260,6 @@ OptionMenu "GLLightOptions" protected Title "$GLLIGHTMNU_TITLE" Option "$TCMNU_DYNLIGHTS", "r_dynlights", "OnOff" Option "$GLLIGHTMNU_LIGHTSENABLED", gl_lights, "OnOff" - Option "$GLLIGHTMNU_LIGHTDEFS", gl_attachedlights, "YesNo" Option "$GLLIGHTMNU_LIGHTSPRITES", gl_light_sprites, "YesNo" Option "$GLLIGHTMNU_LIGHTPARTICLES", gl_light_particles, "YesNo" Option "$GLLIGHTMNU_LIGHTSHADOWMAP", gl_light_shadowmap, "YesNo"