mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'skip-skybox-precip' into 'master'
software: Skip precip mobjs in sky portal renders See merge request KartKrew/Kart!1096
This commit is contained in:
commit
8b02b7efd4
4 changed files with 11 additions and 1 deletions
|
|
@ -1596,11 +1596,15 @@ void R_RenderPlayerView(void)
|
||||||
Mask_Pre(&masks[nummasks - 1]);
|
Mask_Pre(&masks[nummasks - 1]);
|
||||||
curdrawsegs = ds_p;
|
curdrawsegs = ds_p;
|
||||||
|
|
||||||
|
portalskipprecipmobjs = portal->isskybox;
|
||||||
|
|
||||||
// Render the BSP from the new viewpoint, and clip
|
// Render the BSP from the new viewpoint, and clip
|
||||||
// any sprites with the new clipsegs and window.
|
// any sprites with the new clipsegs and window.
|
||||||
R_RenderBSPNode((INT32)numnodes - 1);
|
R_RenderBSPNode((INT32)numnodes - 1);
|
||||||
Mask_Post(&masks[nummasks - 1]);
|
Mask_Post(&masks[nummasks - 1]);
|
||||||
|
|
||||||
|
portalskipprecipmobjs = false;
|
||||||
|
|
||||||
R_ClipSprites(ds_p - (masks[nummasks - 1].drawsegs[1] - masks[nummasks - 1].drawsegs[0]), portal);
|
R_ClipSprites(ds_p - (masks[nummasks - 1].drawsegs[1] - masks[nummasks - 1].drawsegs[0]), portal);
|
||||||
|
|
||||||
Portal_Remove(portal);
|
Portal_Remove(portal);
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
|
|
||||||
UINT8 portalrender; /**< When rendering a portal, it establishes the depth of the current BSP traversal. */
|
UINT8 portalrender; /**< When rendering a portal, it establishes the depth of the current BSP traversal. */
|
||||||
|
boolean portalskipprecipmobjs = false;
|
||||||
|
|
||||||
// Linked list for portals.
|
// Linked list for portals.
|
||||||
portal_t *portal_base, *portal_cap;
|
portal_t *portal_base, *portal_cap;
|
||||||
|
|
@ -127,6 +128,8 @@ static portal_t* Portal_Add (const INT16 x1, const INT16 x2)
|
||||||
// Increase recursion level.
|
// Increase recursion level.
|
||||||
portal->pass = portalrender+1;
|
portal->pass = portalrender+1;
|
||||||
|
|
||||||
|
portal->isskybox = false;
|
||||||
|
|
||||||
return portal;
|
return portal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -309,6 +312,7 @@ void Portal_AddSkybox
|
||||||
portal->viewz += viewz * -mh->skybox_scalez;
|
portal->viewz += viewz * -mh->skybox_scalez;
|
||||||
|
|
||||||
portal->clipline = -1;
|
portal->clipline = -1;
|
||||||
|
portal->isskybox = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Creates portals for the currently existing sky visplanes.
|
/** Creates portals for the currently existing sky visplanes.
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ struct portal_t
|
||||||
angle_t viewangle;
|
angle_t viewangle;
|
||||||
|
|
||||||
UINT8 pass; /**< Keeps track of the portal's recursion depth. */
|
UINT8 pass; /**< Keeps track of the portal's recursion depth. */
|
||||||
|
boolean isskybox;
|
||||||
INT32 clipline; /**< Optional clipline for line-based portals. */
|
INT32 clipline; /**< Optional clipline for line-based portals. */
|
||||||
|
|
||||||
// Clipping information.
|
// Clipping information.
|
||||||
|
|
@ -48,6 +49,7 @@ struct portal_t
|
||||||
extern portal_t* portal_base;
|
extern portal_t* portal_base;
|
||||||
extern portal_t* portal_cap;
|
extern portal_t* portal_cap;
|
||||||
extern UINT8 portalrender;
|
extern UINT8 portalrender;
|
||||||
|
extern boolean portalskipprecipmobjs;
|
||||||
|
|
||||||
extern line_t *portalclipline;
|
extern line_t *portalclipline;
|
||||||
extern sector_t *portalcullsector;
|
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
|
// 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)
|
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue