mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
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:
parent
4d518a220c
commit
605fce9008
3 changed files with 368 additions and 366 deletions
|
@ -766,6 +766,7 @@ void R_EnterPortal (PortalDrawseg* pds, int depth)
|
||||||
|
|
||||||
// some portals have height differences, account for this here
|
// some portals have height differences, account for this here
|
||||||
R_3D_EnterSkybox(); // push 3D floor height map
|
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
|
// first pass, set clipping
|
||||||
memcpy (ceilingclip + pds->x1, &pds->ceilingclip[0], pds->len*sizeof(*ceilingclip));
|
memcpy (ceilingclip + pds->x1, &pds->ceilingclip[0], pds->len*sizeof(*ceilingclip));
|
||||||
|
|
|
@ -716,7 +716,8 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
||||||
}
|
}
|
||||||
|
|
||||||
// [ZZ] Or less definitely not visible (hue)
|
// [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;
|
return;
|
||||||
|
|
||||||
// [RH] Interpolate the sprite's position to make it look smooth
|
// [RH] Interpolate the sprite's position to make it look smooth
|
||||||
|
|
Loading…
Reference in a new issue