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

@ -140,12 +140,15 @@ static void AddLine (seg_t *seg, bool portalclip)
{ {
if (currentsector->sectornum == seg->backsector->sectornum) if (currentsector->sectornum == seg->backsector->sectornum)
{ {
FTexture * tex = TexMan(seg->sidedef->GetTexture(side_t::mid)); if (!seg->linedef->isVisualPortal())
if (!tex || tex->UseType==FTexture::TEX_Null)
{ {
// nothing to do here! FTexture * tex = TexMan(seg->sidedef->GetTexture(side_t::mid));
seg->linedef->validcount=validcount; if (!tex || tex->UseType==FTexture::TEX_Null)
return; {
// nothing to do here!
seg->linedef->validcount=validcount;
return;
}
} }
backsector=currentsector; backsector=currentsector;
} }

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);
} }
} }