Add RF_HIDEINSKYBOX, stop rendering object in skybox

This commit is contained in:
James R 2024-01-09 22:04:58 -08:00
parent fed0740d99
commit fbb6db7167
3 changed files with 8 additions and 0 deletions

View file

@ -6858,6 +6858,7 @@ struct int_const_s const INT_CONST[] = {
{"RF_DROPSHADOW",RF_DROPSHADOW},
{"RF_ABSOLUTELIGHTLEVEL",RF_ABSOLUTELIGHTLEVEL},
{"RF_REDUCEVFX",RF_REDUCEVFX},
{"RF_HIDEINSKYBOX",RF_HIDEINSKYBOX},
{"RF_DONTDRAW",RF_DONTDRAW},
{"RF_DONTDRAWP1",RF_DONTDRAWP1},
{"RF_DONTDRAWP2",RF_DONTDRAWP2},

View file

@ -975,6 +975,7 @@ typedef enum
RF_ABSOLUTELIGHTLEVEL = 0x00010000, // mobj_t.lightlevel is absolute instead of relative
RF_REDUCEVFX = 0x00020000, // only mobj_t.owner can see this object
RF_HIDEINSKYBOX = 0x00040000, // do not render in skybox
RF_DONTDRAW = 0x00F00000, // --Don't generate a vissprite
RF_DONTDRAWP1 = 0x00100000, // No P1

View file

@ -2790,6 +2790,12 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
limit_dist = (fixed_t)(cv_drawdist.value) * mapobjectscale;
for (thing = sec->thinglist; thing; thing = thing->snext)
{
// do not render in skybox
if ((thing->renderflags & RF_HIDEINSKYBOX) && portalskipprecipmobjs)
{
continue;
}
if (R_ThingWithinDist(thing, limit_dist))
{
const INT32 oldobjectsdrawn = objectsdrawn;