- 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.

This commit is contained in:
Christoph Oelckers 2015-02-10 20:16:25 +01:00
parent 8ac34efc4e
commit 8a9692c29f

View file

@ -786,12 +786,12 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
if ( (seg->linedef->flags & ML_DONTPEGBOTTOM) >0) if ( (seg->linedef->flags & ML_DONTPEGBOTTOM) >0)
{ {
texturebottom = MAX(realfront->GetPlaneTexZ(sector_t::floor),realback->GetPlaneTexZ(sector_t::floor))+rowoffset; texturebottom = MAX(realfront->GetPlaneTexZ(sector_t::floor),realback->GetPlaneTexZ(sector_t::floor))+rowoffset;
texturetop=texturebottom+(gltexture->TextureHeight()<<FRACBITS); texturetop=texturebottom+(tci.mRenderHeight << FRACBITS);
} }
else else
{ {
texturetop = MIN(realfront->GetPlaneTexZ(sector_t::ceiling),realback->GetPlaneTexZ(sector_t::ceiling))+rowoffset; texturetop = MIN(realfront->GetPlaneTexZ(sector_t::ceiling),realback->GetPlaneTexZ(sector_t::ceiling))+rowoffset;
texturebottom=texturetop-(gltexture->TextureHeight()<<FRACBITS); texturebottom=texturetop-(tci.mRenderHeight << FRACBITS);
} }
} }
else texturetop=texturebottom=0; else texturetop=texturebottom=0;
@ -918,10 +918,10 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
fixed_t textureoffset = tci.TextureOffset(t_ofs); fixed_t textureoffset = tci.TextureOffset(t_ofs);
int righttex=(textureoffset>>FRACBITS)+seg->sidedef->TexelLength; int righttex=(textureoffset>>FRACBITS)+seg->sidedef->TexelLength;
if ((textureoffset==0 && righttex<=gltexture->TextureWidth()) || if ((textureoffset == 0 && righttex <= tci.mRenderWidth) ||
(textureoffset>=0 && righttex==gltexture->TextureWidth())) (textureoffset >= 0 && righttex == tci.mRenderWidth))
{ {
flags|=GLT_CLAMPX; flags |= GLT_CLAMPX;
} }
else else
{ {
@ -1420,7 +1420,7 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
sector_t * realback; sector_t * realback;
#ifdef _DEBUG #ifdef _DEBUG
if (seg->linedef-lines==1276) if (seg->linedef-lines==4)
{ {
int a = 0; int a = 0;
} }