From 56e5242201e45bd4c0f4887fcd7b8e0d738ab57a Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 3 Aug 2024 21:25:59 +0200 Subject: [PATCH] Fix few remaining uses of `this_scale` and `ty` Not too sure if this is correct tho --- src/hardware/hw_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 149a468f8..101cbba67 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3534,10 +3534,12 @@ static fixed_t HWR_OpaqueFloorAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t hei swallVerts[0].z = swallVerts[3].z = spr->z1; swallVerts[2].z = swallVerts[1].z = spr->z2; - if (spr->mobj && fabsf(this_scale - 1.0f) > 1.0E-36f) + // this_scale now doesn't exist (always 1.0 basically), so this condition is always false. Not + // too sure if this is correct, so will just comment out for now + /*if (spr->mobj && fabsf(this_scale - 1.0f) > 1.0E-36f) { // Always a pixel above the floor, perfectly flat. - swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->ty - gpatch->topoffset * this_scale - (floorheight+3); + swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->gzt - gpatch->topoffset * this_scale - (floorheight+3); // Now transform the TOP vertices along the floor in the direction of the camera swallVerts[3].x = spr->x1 + ((gpatch->height * this_scale) + offset) * gr_viewcos; @@ -3545,10 +3547,10 @@ static fixed_t HWR_OpaqueFloorAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t hei swallVerts[3].z = spr->z1 + ((gpatch->height * this_scale) + offset) * gr_viewsin; swallVerts[2].z = spr->z2 + ((gpatch->height * this_scale) + offset) * gr_viewsin; } - else + else*/ { // Always a pixel above the floor, perfectly flat. - swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->ty - gpatch->topoffset - (floorheight+3); + swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->gzt - gpatch->topoffset - (floorheight+3); // Now transform the TOP vertices along the floor in the direction of the camera swallVerts[3].x = spr->x1 + (gpatch->height + offset) * gr_viewcos;