mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- 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 "gl/system//gl_interface.h"
|
||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Int, vid_renderer)
|
extern int currentrenderer;
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
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;
|
specialf1 = DAngle(double(SpawnAngle)).Normalized360().Degrees;
|
||||||
visibletoplayer = true;
|
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_INTENSITY] = args[LIGHT_INTENSITY] * 2 / 3;
|
||||||
args[LIGHT_SECONDARY_INTENSITY] = args[LIGHT_SECONDARY_INTENSITY] * 2 / 3;
|
args[LIGHT_SECONDARY_INTENSITY] = args[LIGHT_SECONDARY_INTENSITY] * 2 / 3;
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
#include "actorinlines.h"
|
#include "actorinlines.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Int, vid_renderer)
|
extern int currentrenderer;
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
@ -197,7 +197,7 @@ static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flag
|
||||||
|
|
||||||
// kg3D - software renderer only hack
|
// kg3D - software renderer only hack
|
||||||
// this is really required because of ceilingclip and floorclip
|
// this is really required because of ceilingclip and floorclip
|
||||||
if((vid_renderer == 0) && (flags & FF_BOTHPLANES))
|
if((currentrenderer == 0) && (flags & FF_BOTHPLANES))
|
||||||
{
|
{
|
||||||
P_Add3DFloor(sec, sec2, master, FF_EXISTS | FF_THISINSIDE | FF_RENDERPLANES | FF_NOSHADE | FF_SEETHROUGH | FF_SHOOTTHROUGH |
|
P_Add3DFloor(sec, sec2, master, FF_EXISTS | FF_THISINSIDE | FF_RENDERPLANES | FF_NOSHADE | FF_SEETHROUGH | FF_SHOOTTHROUGH |
|
||||||
(flags & (FF_INVERTSECTOR | FF_TRANSLUCENT | FF_ADDITIVETRANS)), alpha);
|
(flags & (FF_INVERTSECTOR | FF_TRANSLUCENT | FF_ADDITIVETRANS)), alpha);
|
||||||
|
|
Loading…
Reference in a new issue