mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Fix R_DrawColumnShadowed_8 crash encountered in FuriousFox's map
If you want more specifics, sloped FOFs are to blame it turns out: sometimes the bottom of an FOF wall blocking a segment of an in-level wall column can be considered ABOVE the top part of the FOF there (yikes), and then the dc_y* values go offscreen, and then BOOM
This commit is contained in:
parent
03ddc1f29a
commit
dc765cde2c
1 changed files with 12 additions and 0 deletions
|
@ -1363,7 +1363,19 @@ void R_DrawColumnShadowed_8(void)
|
||||||
|
|
||||||
height = dc_lightlist[i].height >> LIGHTSCALESHIFT;
|
height = dc_lightlist[i].height >> LIGHTSCALESHIFT;
|
||||||
if (solid)
|
if (solid)
|
||||||
|
{
|
||||||
bheight = dc_lightlist[i].botheight >> LIGHTSCALESHIFT;
|
bheight = dc_lightlist[i].botheight >> LIGHTSCALESHIFT;
|
||||||
|
if (bheight < height)
|
||||||
|
{
|
||||||
|
// confounded slopes sometimes allow partial invertedness,
|
||||||
|
// even including cases where the top and bottom heights
|
||||||
|
// should actually be the same!
|
||||||
|
// swap the height values as a workaround for this quirk
|
||||||
|
INT32 temp = height;
|
||||||
|
height = bheight;
|
||||||
|
bheight = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (height <= dc_yl)
|
if (height <= dc_yl)
|
||||||
{
|
{
|
||||||
dc_colormap = dc_lightlist[i].rcolormap;
|
dc_colormap = dc_lightlist[i].rcolormap;
|
||||||
|
|
Loading…
Reference in a new issue