- 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 committed by Christoph Oelckers
commit 68b6f922f7
10 changed files with 89 additions and 9 deletions

View file

@ -28,10 +28,10 @@
#include "poly_sprite.h"
#include "polyrenderer/poly_renderer.h"
#include "polyrenderer/scene/poly_light.h"
#include "r_data/r_vanillatrans.h"
EXTERN_CVAR(Float, transsouls)
EXTERN_CVAR(Int, r_drawfuzz)
EXTERN_CVAR (Bool, r_vanillatrans)
bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right)
{
@ -146,7 +146,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane
args.SetStencilTestValue(stencilValue);
args.SetWriteStencil(true, stencilValue);
args.SetClipPlane(clipPlane);
if ((thing->renderflags & RF_ZDOOMTRANS) && r_vanillatrans)
if ((thing->renderflags & RF_ZDOOMTRANS) && UseVanillaTransparency())
args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite);
else
args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite);