mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add pad checks for visplanes; invalidate invalid columns from visplanes (visplane renderer and column renderers don't speak exactly the same language).
The visplane portal top boundary offset has been restored since all known bugs involving it have been fixed.
This commit is contained in:
parent
f0b79697e5
commit
ebe0586993
1 changed files with 13 additions and 1 deletions
|
|
@ -200,7 +200,14 @@ static void Portal_ClipVisplane (const visplane_t* plane, portal_t* portal)
|
|||
|
||||
for (i = 0; i < end - start; i++)
|
||||
{
|
||||
portal->ceilingclip[i] = plane->top[i + start];
|
||||
// Invalid column.
|
||||
if (plane->top[i + start] == 65535)
|
||||
{
|
||||
portal->ceilingclip[i] = -1;
|
||||
portal->floorclip[i] = -1;
|
||||
continue;
|
||||
}
|
||||
portal->ceilingclip[i] = plane->top[i + start] - 1;
|
||||
portal->floorclip[i] = plane->bottom[i + start] + 1;
|
||||
portal->frontscale[i] = INT32_MAX;
|
||||
}
|
||||
|
|
@ -220,6 +227,11 @@ void Portal_AddSkybox (const visplane_t* plane)
|
|||
mapheader_t *mh;
|
||||
portal_t* portal;
|
||||
|
||||
// Visplanes have 1-px pads on their sides (extra columns).
|
||||
// Trim them, else it may render out of bounds.
|
||||
if (end > viewwidth)
|
||||
end = viewwidth;
|
||||
|
||||
if (!(start < end))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue