Fixed skybox clipping: things in a skybox shouldn't be clipped against current portal. Fixed: portal inside of a skybox sets CurrentPortalInSkybox to false.

This commit is contained in:
ZZYZX 2016-01-10 05:45:26 +02:00
parent 4d518a220c
commit 605fce9008
3 changed files with 368 additions and 366 deletions

View File

@ -766,6 +766,7 @@ void R_EnterPortal (PortalDrawseg* pds, int depth)
// some portals have height differences, account for this here
R_3D_EnterSkybox(); // push 3D floor height map
CurrentPortalInSkybox = false; // first portal in a skybox should set this variable to false for proper clipping in skyboxes.
// first pass, set clipping
memcpy (ceilingclip + pds->x1, &pds->ceilingclip[0], pds->len*sizeof(*ceilingclip));

View File

@ -716,7 +716,8 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
}
// [ZZ] Or less definitely not visible (hue)
if (CurrentPortal && !!P_PointOnLineSide(thing->x, thing->y, CurrentPortal->dst))
// [ZZ] 10.01.2016: don't try to clip stuff inside a skybox against the current portal.
if (!CurrentPortalInSkybox && CurrentPortal && !!P_PointOnLineSide(thing->x, thing->y, CurrentPortal->dst))
return;
// [RH] Interpolate the sprite's position to make it look smooth