mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
software: Skip precip mobjs in sky portal renders
This commit is contained in:
parent
aab248b25c
commit
04a6132f66
4 changed files with 11 additions and 1 deletions
|
|
@ -1599,11 +1599,15 @@ void R_RenderPlayerView(void)
|
|||
Mask_Pre(&masks[nummasks - 1]);
|
||||
curdrawsegs = ds_p;
|
||||
|
||||
portalskipprecipmobjs = portal->isskybox;
|
||||
|
||||
// Render the BSP from the new viewpoint, and clip
|
||||
// any sprites with the new clipsegs and window.
|
||||
R_RenderBSPNode((INT32)numnodes - 1);
|
||||
Mask_Post(&masks[nummasks - 1]);
|
||||
|
||||
portalskipprecipmobjs = false;
|
||||
|
||||
R_ClipSprites(ds_p - (masks[nummasks - 1].drawsegs[1] - masks[nummasks - 1].drawsegs[0]), portal);
|
||||
|
||||
Portal_Remove(portal);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "r_sky.h"
|
||||
|
||||
UINT8 portalrender; /**< When rendering a portal, it establishes the depth of the current BSP traversal. */
|
||||
boolean portalskipprecipmobjs = false;
|
||||
|
||||
// Linked list for portals.
|
||||
portal_t *portal_base, *portal_cap;
|
||||
|
|
@ -127,6 +128,8 @@ static portal_t* Portal_Add (const INT16 x1, const INT16 x2)
|
|||
// Increase recursion level.
|
||||
portal->pass = portalrender+1;
|
||||
|
||||
portal->isskybox = false;
|
||||
|
||||
return portal;
|
||||
}
|
||||
|
||||
|
|
@ -309,6 +312,7 @@ void Portal_AddSkybox
|
|||
portal->viewz += viewz * -mh->skybox_scalez;
|
||||
|
||||
portal->clipline = -1;
|
||||
portal->isskybox = true;
|
||||
}
|
||||
|
||||
/** Creates portals for the currently existing sky visplanes.
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ struct portal_t
|
|||
angle_t viewangle;
|
||||
|
||||
UINT8 pass; /**< Keeps track of the portal's recursion depth. */
|
||||
boolean isskybox;
|
||||
INT32 clipline; /**< Optional clipline for line-based portals. */
|
||||
|
||||
// Clipping information.
|
||||
|
|
@ -48,6 +49,7 @@ struct portal_t
|
|||
extern portal_t* portal_base;
|
||||
extern portal_t* portal_cap;
|
||||
extern UINT8 portalrender;
|
||||
extern boolean portalskipprecipmobjs;
|
||||
|
||||
extern line_t *portalclipline;
|
||||
extern sector_t *portalcullsector;
|
||||
|
|
|
|||
|
|
@ -2698,7 +2698,7 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
|
|||
}
|
||||
|
||||
// no, no infinite draw distance for precipitation. this option at zero is supposed to turn it off
|
||||
if ((limit_dist = (fixed_t)cv_drawdist_precip.value * mapobjectscale))
|
||||
if ((limit_dist = (fixed_t)cv_drawdist_precip.value * mapobjectscale) && !portalskipprecipmobjs)
|
||||
{
|
||||
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue