From 8a9692c29f0d5706c1ffd41886fd94f5d20d28b0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 Feb 2015 20:16:25 +0100 Subject: [PATCH] - fixed: The code which decided whether to clamp two sided middle textures used the texture size instead of the render size for the specific linedef, meaning that any per-sidedef scaling was ignored. --- src/gl/scene/gl_walls.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; }