From f9445e96f5142a83abb12d122f1e5b8273264da9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 3 May 2017 10:26:25 +0200 Subject: [PATCH] - fixed: DPSprite::GetRenderStyle returned the wrong alpha value. --- src/p_pspr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index bd2e4219c..2404b8b9c 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -322,7 +322,6 @@ std::pair DPSprite::GetRenderStyle(FRenderStyle ownerstyle, mystyle.CheckFuzz(); if (Flags & PSPF_RENDERSTYLE) { - ownerstyle.CheckFuzz(); if (Flags & PSPF_FORCESTYLE) { returnstyle = mystyle; @@ -372,6 +371,10 @@ std::pair DPSprite::GetRenderStyle(FRenderStyle ownerstyle, returnalpha = owneralpha * alpha; } } + else + { + returnalpha = owneralpha; + } // Should normal renderstyle come out on top at the end and we desire alpha, // switch it to translucent. Normal never applies any sort of alpha. @@ -381,7 +384,7 @@ std::pair DPSprite::GetRenderStyle(FRenderStyle ownerstyle, returnalpha = owneralpha * alpha; } - return{ returnstyle, clamp(float(alpha), 0.f, 1.f) }; + return{ returnstyle, clamp(float(returnalpha), 0.f, 1.f) }; } //---------------------------------------------------------------------------