diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 51ac24229..95ced549a 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -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); 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); else if (alpha!=255) flags|=FF_TRANSLUCENT;