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;