mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
- fixed: DPSprite::GetRenderStyle returned the wrong alpha value.
This commit is contained in:
parent
00dab8677a
commit
f9445e96f5
1 changed files with 5 additions and 2 deletions
|
@ -322,7 +322,6 @@ std::pair<FRenderStyle, float> DPSprite::GetRenderStyle(FRenderStyle ownerstyle,
|
|||
mystyle.CheckFuzz();
|
||||
if (Flags & PSPF_RENDERSTYLE)
|
||||
{
|
||||
ownerstyle.CheckFuzz();
|
||||
if (Flags & PSPF_FORCESTYLE)
|
||||
{
|
||||
returnstyle = mystyle;
|
||||
|
@ -372,6 +371,10 @@ std::pair<FRenderStyle, float> 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<FRenderStyle, float> DPSprite::GetRenderStyle(FRenderStyle ownerstyle,
|
|||
returnalpha = owneralpha * alpha;
|
||||
}
|
||||
|
||||
return{ returnstyle, clamp<float>(float(alpha), 0.f, 1.f) };
|
||||
return{ returnstyle, clamp<float>(float(returnalpha), 0.f, 1.f) };
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue