diff --git a/src/deh_tables.c b/src/deh_tables.c index 67f65c197..74ad120ba 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -6196,6 +6196,7 @@ struct int_const_s const INT_CONST[] = { {"RF_SHADOWEFFECTS",RF_SHADOWEFFECTS}, {"RF_DROPSHADOW",RF_DROPSHADOW}, {"RF_ABSOLUTELIGHTLEVEL",RF_ABSOLUTELIGHTLEVEL}, + {"RF_HIDEINSKYBOX",RF_HIDEINSKYBOX}, {"RF_DONTDRAW",RF_DONTDRAW}, {"RF_DONTDRAWP1",RF_DONTDRAWP1}, {"RF_DONTDRAWP2",RF_DONTDRAWP2}, diff --git a/src/r_defs.h b/src/r_defs.h index 70e9e8563..d8d16bdc0 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -944,6 +944,7 @@ typedef enum RF_DROPSHADOW = (RF_SHADOWDRAW | RF_SHADOWEFFECTS | RF_FULLDARK), RF_ABSOLUTELIGHTLEVEL = 0x00010000, // mobj_t.lightlevel is absolute instead of relative + RF_HIDEINSKYBOX = 0x00020000, // do not render in skybox RF_DONTDRAW = 0x00F00000, // --Don't generate a vissprite RF_DONTDRAWP1 = 0x00100000, // No P1 diff --git a/src/r_things.c b/src/r_things.c index 6a86f4d10..d23e70c57 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2660,6 +2660,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;