From 6303935ad61bc360dae646ac052a784b1d68e782 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 7 Aug 2014 19:57:55 -0500 Subject: [PATCH] Use wall sprite Y scale --- src/r_things.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/r_things.cpp b/src/r_things.cpp index 84ce18b64..9a6bfee6f 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -416,8 +416,8 @@ void R_DrawWallSprite(vissprite_t *spr) return; WallT.InitFromWallCoords(&spr->wallc); PrepWall(swall, lwall, spr->pic->GetWidth() << FRACBITS, x1, x2); - dc_texturemid = spr->gzt - viewz; - yscale = FRACUNIT; + yscale = spr->yscale; + dc_texturemid = FixedDiv(spr->gzt - viewz, yscale); if (spr->renderflags & RF_XFLIP) { int right = (spr->pic->GetWidth() << FRACBITS) - 1; @@ -1075,6 +1075,7 @@ static void R_ProjectWallSprite(AActor *thing, fixed_t fx, fixed_t fy, fixed_t f vis = R_NewVisSprite(); vis->x1 = wallc.sx1 < WindowLeft ? WindowLeft : wallc.sx1; vis->x2 = wallc.sx2 >= WindowRight ? WindowRight-1 : wallc.sx2-1; + vis->yscale = yscale; vis->idepth = (unsigned)DivScale32(1, tz) >> 1; vis->depth = tz; vis->sector = thing->Sector;