diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index 1879515a4..d192bf36f 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -786,12 +786,12 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary, if ( (seg->linedef->flags & ML_DONTPEGBOTTOM) >0) { texturebottom = MAX(realfront->GetPlaneTexZ(sector_t::floor),realback->GetPlaneTexZ(sector_t::floor))+rowoffset; - texturetop=texturebottom+(gltexture->TextureHeight()<GetPlaneTexZ(sector_t::ceiling),realback->GetPlaneTexZ(sector_t::ceiling))+rowoffset; - texturebottom=texturetop-(gltexture->TextureHeight()<>FRACBITS)+seg->sidedef->TexelLength; - if ((textureoffset==0 && righttex<=gltexture->TextureWidth()) || - (textureoffset>=0 && righttex==gltexture->TextureWidth())) + if ((textureoffset == 0 && righttex <= tci.mRenderWidth) || + (textureoffset >= 0 && righttex == tci.mRenderWidth)) { - flags|=GLT_CLAMPX; + flags |= GLT_CLAMPX; } else { @@ -1420,7 +1420,7 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector) sector_t * realback; #ifdef _DEBUG - if (seg->linedef-lines==1276) + if (seg->linedef-lines==4) { int a = 0; }