- fixed: "vid_renderer" should NEVER be referenced outside of the hardware code. This may fix a crash when changing modes with vid_renderer not matching actual renderer
This commit is contained in:
parent
49449e623e
commit
8c992647de
2 changed files with 4 additions and 4 deletions
|
|
@ -76,7 +76,7 @@
|
|||
#include "gl/system//gl_interface.h"
|
||||
#include "vm.h"
|
||||
|
||||
EXTERN_CVAR(Int, vid_renderer)
|
||||
extern int currentrenderer;
|
||||
|
||||
|
||||
CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
|
|
@ -164,7 +164,7 @@ void ADynamicLight::BeginPlay()
|
|||
specialf1 = DAngle(double(SpawnAngle)).Normalized360().Degrees;
|
||||
visibletoplayer = true;
|
||||
|
||||
if (vid_renderer == 1 && gl.legacyMode && (flags4 & MF4_ATTENUATE))
|
||||
if (currentrenderer == 1 && gl.legacyMode && (flags4 & MF4_ATTENUATE))
|
||||
{
|
||||
args[LIGHT_INTENSITY] = args[LIGHT_INTENSITY] * 2 / 3;
|
||||
args[LIGHT_SECONDARY_INTENSITY] = args[LIGHT_SECONDARY_INTENSITY] * 2 / 3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue