- fixed: The 3D floor setup code treated alphas larger than 255 as translucent. This was causing problems with ZDCMP2 in GZDoom

This commit is contained in:
Christoph Oelckers 2013-12-25 22:30:47 +01:00
parent ae49044f96
commit 6e0f885135

View file

@ -293,8 +293,9 @@ static int P_Set3DFloor(line_t * line, int param, int param2, int alpha)
FTextureID tex = line->sidedef[0]->GetTexture(side_t::top); FTextureID tex = line->sidedef[0]->GetTexture(side_t::top);
if (!tex.Exists() && alpha<255) if (!tex.Exists() && alpha<255)
{ {
alpha=clamp(-tex.GetIndex(), 0, 255); alpha = -tex.GetIndex();
} }
alpha = clamp(alpha, 0, 255);
if (alpha==0) flags&=~(FF_RENDERALL|FF_BOTHPLANES|FF_ALLSIDES); if (alpha==0) flags&=~(FF_RENDERALL|FF_BOTHPLANES|FF_ALLSIDES);
else if (alpha!=255) flags|=FF_TRANSLUCENT; else if (alpha!=255) flags|=FF_TRANSLUCENT;