Take slopes into account even more in FOF wall cutoff in HWR_ProcessSeg

This commit is contained in:
Hannu Hanhi 2021-01-10 20:52:03 +02:00
parent ed82b94e64
commit eb1e7eff8f

View file

@ -1641,10 +1641,17 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
hS = P_GetFFloorTopZAt (rover, v2x, v2y);
l = P_GetFFloorBottomZAt(rover, v1x, v1y);
lS = P_GetFFloorBottomZAt(rover, v2x, v2y);
if (!(*rover->t_slope) && !gl_frontsector->c_slope && !gl_backsector->c_slope && h > highcut)
h = hS = highcut;
if (!(*rover->b_slope) && !gl_frontsector->f_slope && !gl_backsector->f_slope && l < lowcut)
l = lS = lowcut;
// Adjust the heights so the FOF does not overlap with top and bottom textures.
if (h >= highcut && hS >= highcutslope)
{
h = highcut;
hS = highcutslope;
}
if (l <= lowcut && lS <= lowcutslope)
{
l = lowcut;
lS = lowcutslope;
}
//Hurdler: HW code starts here
//FIXME: check if peging is correct
// set top/bottom coords
@ -1790,10 +1797,17 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
hS = P_GetFFloorTopZAt (rover, v2x, v2y);
l = P_GetFFloorBottomZAt(rover, v1x, v1y);
lS = P_GetFFloorBottomZAt(rover, v2x, v2y);
if (!(*rover->t_slope) && !gl_frontsector->c_slope && !gl_backsector->c_slope && h > highcut)
h = hS = highcut;
if (!(*rover->b_slope) && !gl_frontsector->f_slope && !gl_backsector->f_slope && l < lowcut)
l = lS = lowcut;
// Adjust the heights so the FOF does not overlap with top and bottom textures.
if (h >= highcut && hS >= highcutslope)
{
h = highcut;
hS = highcutslope;
}
if (l <= lowcut && lS <= lowcutslope)
{
l = lowcut;
lS = lowcutslope;
}
//Hurdler: HW code starts here
//FIXME: check if peging is correct
// set top/bottom coords