Skip to content

Commit

Permalink
same invul rules for SKYDEFS (#2153)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfomin authored Jan 25, 2025
1 parent c710992 commit cec33c2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/r_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ static void R_MakeSpans(int x, unsigned int t1, unsigned int b1, unsigned int t2

static void DrawSkyFire(visplane_t *pl, fire_t *fire)
{
dc_colormap[0] = dc_colormap[1] = fullcolormap;

dc_texturemid = -28 * FRACUNIT;
dc_iscale = skyiscale;
dc_texheight = FIRE_HEIGHT;
Expand All @@ -408,8 +406,6 @@ static void DrawSkyTex(visplane_t *pl, skytex_t *skytex)
{
int texture = R_TextureNumForName(skytex->name);

dc_colormap[0] = dc_colormap[1] = fullcolormap;

dc_texturemid = skytex->mid * FRACUNIT;
dc_texheight = textureheight[texture] >> FRACBITS;
dc_iscale = FixedMul(skyiscale, skytex->scaley);
Expand Down Expand Up @@ -447,6 +443,17 @@ static void DrawSkyTex(visplane_t *pl, skytex_t *skytex)

static void DrawSkyDef(visplane_t *pl)
{
// Sky is always drawn full bright, i.e. colormaps[0] is used.
// Because of this hack, sky is not affected by INVUL inverse mapping.
//
// killough 7/19/98: fix hack to be more realistic:

if (STRICTMODE_COMP(comp_skymap)
|| !(dc_colormap[0] = dc_colormap[1] = fixedcolormap))
{
dc_colormap[0] = dc_colormap[1] = fullcolormap; // killough 3/20/98
}

if (sky->type == SkyType_Fire)
{
DrawSkyFire(pl, &sky->fire);
Expand Down

0 comments on commit cec33c2

Please sign in to comment.