From e6f571729f56c6dbe3686c0aa2eca3627b4b72d0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 27 Aug 2013 23:31:23 +0200 Subject: [PATCH] - fixed: When calculating an y-texture offset the scale was multiplied with instead of divided by. --- src/gl/scene/gl_walls.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index e7265c1a1..64d3d02d5 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -760,9 +760,21 @@ void GLWall::DoTexture(int _type,seg_t * seg, int peg, type = (seg->linedef->special == Line_Mirror && _type == RENDERWALL_M1S && gl_mirrors) ? RENDERWALL_MIRROR : _type; - float floatceilingref = FIXED2FLOAT(ceilingrefheight) + - FIXED2FLOAT(tci.RowOffset(seg->sidedef->GetTextureYOffset(texpos))) + - FIXED2FLOAT((peg ? (gltexture->TextureHeight(GLUSE_TEXTURE)<sidedef->GetTextureYOffset(texpos))); + float f3 = 0; + + if (peg) + { + int foo = (gltexture->TextureHeight(GLUSE_TEXTURE) << 17) / tci.mTempScaleY; + fixed_t of = (foo >> 1) + (foo & 1); + f3 = of - FIXED2FLOAT(lh - v_offset); + + float f3a = FIXED2FLOAT((peg ? (gltexture->TextureHeight(GLUSE_TEXTURE)<sidedef->GetTextureXOffset(texpos))) return; @@ -1448,7 +1460,7 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector) #ifdef _MSC_VER #ifdef _DEBUG - if (seg->linedef-lines==2570) + if (seg->linedef-lines==636) __asm nop #endif #endif