This commit is contained in:
Rachael Alexanderson 2016-11-17 17:37:11 -05:00
commit bac3ae3bf8
2 changed files with 14 additions and 6 deletions

View file

@ -139,6 +139,8 @@ static void AddLine (seg_t *seg, bool portalclip)
else if (!ispoly) // Two-sided polyobjects never obstruct the view else if (!ispoly) // Two-sided polyobjects never obstruct the view
{ {
if (currentsector->sectornum == seg->backsector->sectornum) if (currentsector->sectornum == seg->backsector->sectornum)
{
if (!seg->linedef->isVisualPortal())
{ {
FTexture * tex = TexMan(seg->sidedef->GetTexture(side_t::mid)); FTexture * tex = TexMan(seg->sidedef->GetTexture(side_t::mid));
if (!tex || tex->UseType==FTexture::TEX_Null) if (!tex || tex->UseType==FTexture::TEX_Null)
@ -147,6 +149,7 @@ static void AddLine (seg_t *seg, bool portalclip)
seg->linedef->validcount=validcount; seg->linedef->validcount=validcount;
return; return;
} }
}
backsector=currentsector; backsector=currentsector;
} }
else else

View file

@ -82,6 +82,7 @@ CVAR(Bool, gl_sort_textures, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
EXTERN_CVAR (Bool, cl_capfps) EXTERN_CVAR (Bool, cl_capfps)
EXTERN_CVAR (Bool, r_deathcamera) EXTERN_CVAR (Bool, r_deathcamera)
EXTERN_CVAR (Float, underwater_fade_scalar)
extern int viewpitch; extern int viewpitch;
@ -633,7 +634,11 @@ void FGLRenderer::DrawBlend(sector_t * viewsector)
} }
else if (blendv.a) else if (blendv.a)
{ {
V_AddBlend(blendv.r / 255.f, blendv.g / 255.f, blendv.b / 255.f, blendv.a / 255.0f, blend); // [Nash] allow user to set blend intensity
int cnt = blendv.a;
cnt = (int)(cnt * underwater_fade_scalar);
V_AddBlend(blendv.r / 255.f, blendv.g / 255.f, blendv.b / 255.f, cnt / 255.0f, blend);
} }
} }