- 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.
This commit is contained in:
Christoph Oelckers 2019-01-30 20:21:00 +01:00
parent 95679c36b2
commit a2065cae4b
4 changed files with 1 additions and 5 deletions

View file

@ -75,8 +75,6 @@ CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN
else AActor::DeleteAllAttachedLights(); else AActor::DeleteAllAttachedLights();
} }
CVAR (Bool, gl_attachedlights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
//========================================================================== //==========================================================================
// //
//========================================================================== //==========================================================================
@ -859,6 +857,7 @@ void AActor::RecreateAllAttachedLights()
if (a->IsKindOf(NAME_DynamicLight)) if (a->IsKindOf(NAME_DynamicLight))
{ {
::AttachLight(a); ::AttachLight(a);
::ActivateLight(a);
} }
else else
{ {

View file

@ -6,7 +6,6 @@
EXTERN_CVAR(Bool, r_dynlights) EXTERN_CVAR(Bool, r_dynlights)
EXTERN_CVAR(Bool, gl_lights) EXTERN_CVAR(Bool, gl_lights)
EXTERN_CVAR(Bool, gl_attachedlights)
struct side_t; struct side_t;
struct seg_t; struct seg_t;

View file

@ -16,7 +16,6 @@ EXTERN_CVAR(Bool, gl_usefb)
EXTERN_CVAR(Int, gl_weaponlight) EXTERN_CVAR(Int, gl_weaponlight)
EXTERN_CVAR (Bool, gl_lights); EXTERN_CVAR (Bool, gl_lights);
EXTERN_CVAR (Bool, gl_attachedlights);
EXTERN_CVAR (Bool, gl_light_sprites); EXTERN_CVAR (Bool, gl_light_sprites);
EXTERN_CVAR (Bool, gl_light_particles); EXTERN_CVAR (Bool, gl_light_particles);

View file

@ -2260,7 +2260,6 @@ OptionMenu "GLLightOptions" protected
Title "$GLLIGHTMNU_TITLE" Title "$GLLIGHTMNU_TITLE"
Option "$TCMNU_DYNLIGHTS", "r_dynlights", "OnOff" Option "$TCMNU_DYNLIGHTS", "r_dynlights", "OnOff"
Option "$GLLIGHTMNU_LIGHTSENABLED", gl_lights, "OnOff" Option "$GLLIGHTMNU_LIGHTSENABLED", gl_lights, "OnOff"
Option "$GLLIGHTMNU_LIGHTDEFS", gl_attachedlights, "YesNo"
Option "$GLLIGHTMNU_LIGHTSPRITES", gl_light_sprites, "YesNo" Option "$GLLIGHTMNU_LIGHTSPRITES", gl_light_sprites, "YesNo"
Option "$GLLIGHTMNU_LIGHTPARTICLES", gl_light_particles, "YesNo" Option "$GLLIGHTMNU_LIGHTPARTICLES", gl_light_particles, "YesNo"
Option "$GLLIGHTMNU_LIGHTSHADOWMAP", gl_light_shadowmap, "YesNo" Option "$GLLIGHTMNU_LIGHTSHADOWMAP", gl_light_shadowmap, "YesNo"