mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix software splats breaking and crashing in skyboxes
This commit is contained in:
parent
3083d97e16
commit
b7c23b9187
1 changed files with 13 additions and 1 deletions
|
|
@ -3090,13 +3090,25 @@ void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, drawseg_t* dsstart, p
|
||||||
|
|
||||||
if (portal)
|
if (portal)
|
||||||
{
|
{
|
||||||
for (x = x1; x <= x2; x++)
|
INT32 start_index = max(portal->start, x1);
|
||||||
|
INT32 end_index = min(portal->start + portal->end - portal->start, x2);
|
||||||
|
for (x = x1; x < start_index; x++)
|
||||||
|
{
|
||||||
|
spr->clipbot[x] = -1;
|
||||||
|
spr->cliptop[x] = -1;
|
||||||
|
}
|
||||||
|
for (x = start_index; x <= end_index; x++)
|
||||||
{
|
{
|
||||||
if (spr->clipbot[x] > portal->floorclip[x - portal->start])
|
if (spr->clipbot[x] > portal->floorclip[x - portal->start])
|
||||||
spr->clipbot[x] = portal->floorclip[x - portal->start];
|
spr->clipbot[x] = portal->floorclip[x - portal->start];
|
||||||
if (spr->cliptop[x] < portal->ceilingclip[x - portal->start])
|
if (spr->cliptop[x] < portal->ceilingclip[x - portal->start])
|
||||||
spr->cliptop[x] = portal->ceilingclip[x - portal->start];
|
spr->cliptop[x] = portal->ceilingclip[x - portal->start];
|
||||||
}
|
}
|
||||||
|
for (x = end_index + 1; x <= x2; x++)
|
||||||
|
{
|
||||||
|
spr->clipbot[x] = -1;
|
||||||
|
spr->cliptop[x] = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue