- Added auto-detection scheme for r_vanillatrans

It now works the following way:
(0) - Force off (ZDoom defaults)
(1) - Force on (Doom defaults)
(2) - Auto off (Prefer ZDoom defaults - if DEHACKED is detected with no ZSCRIPT it will turn on) (default)
(3) - Auto on (Prefer Doom defaults - if DECORATE is detected with no ZSCRIPT it will turn off)
This commit is contained in:
Rachael Alexanderson 2017-06-03 20:00:53 -04:00
commit 9af370f51e
10 changed files with 89 additions and 9 deletions

View file

@ -65,10 +65,10 @@
#include "swrenderer/r_memory.h"
#include "swrenderer/r_renderthread.h"
#include "a_dynlight.h"
#include "r_data/r_vanillatrans.h"
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor)
EXTERN_CVAR(Bool, gl_light_sprites)
EXTERN_CVAR (Bool, r_vanillatrans)
namespace swrenderer
{
@ -213,7 +213,7 @@ namespace swrenderer
if (thing->flags5 & MF5_BRIGHT)
vis->renderflags |= RF_FULLBRIGHT; // kg3D
vis->RenderStyle = thing->RenderStyle;
if (r_vanillatrans)
if (UseVanillaTransparency())
{
if (thing->renderflags & RF_ZDOOMTRANS)
vis->RenderStyle = LegacyRenderStyles[STYLE_Normal];