- Added a new UDMF sidedef flag: lightfog.

SVN r3933 (trunk)
This commit is contained in:
Randy Heit 2012-11-03 02:02:42 +00:00
parent d0c3c924d4
commit 0f0dcc08a2
5 changed files with 13 additions and 4 deletions

View file

@ -141,6 +141,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
light = <integer>; // This side's light level. Default is 0. light = <integer>; // This side's light level. Default is 0.
lightabsolute = <bool>; // true = 'light' is an absolute value. Default is lightabsolute = <bool>; // true = 'light' is an absolute value. Default is
// relative to the owning sector's light level. // relative to the owning sector's light level.
lightfog = <bool>; // true = This side's relative lighting is used even in
// foggy sectors. Default is to disable relative
// lighting in foggy sectors.
nofakecontrast = <bool>; // Disables use of fake contrast on this sidedef. nofakecontrast = <bool>; // Disables use of fake contrast on this sidedef.
smoothlighting = <bool>; // Use smooth fake contrast. smoothlighting = <bool>; // Use smooth fake contrast.
clipmidtex = <bool>; // Side's mid textures are clipped to floor and ceiling. clipmidtex = <bool>; // Side's mid textures are clipped to floor and ceiling.

View file

@ -448,6 +448,7 @@ xx(scalex_bottom)
xx(scaley_bottom) xx(scaley_bottom)
xx(light) xx(light)
xx(lightabsolute) xx(lightabsolute)
xx(lightfog)
xx(nofakecontrast) xx(nofakecontrast)
xx(smoothlighting) xx(smoothlighting)
xx(blockprojectiles) xx(blockprojectiles)

View file

@ -996,10 +996,10 @@ int side_t::GetLightLevel (bool foggy, int baselight, bool noabsolute, int *pfak
baselight += rel; baselight += rel;
} }
} }
if (!(Flags & WALLF_ABSLIGHTING)) }
{ if (!(Flags & WALLF_ABSLIGHTING) && (!foggy || (Flags & WALLF_LIGHT_FOG)))
baselight += this->Light; {
} baselight += this->Light;
} }
return baselight; return baselight;
} }

View file

@ -1053,6 +1053,10 @@ public:
Flag(sd->Flags, WALLF_ABSLIGHTING, key); Flag(sd->Flags, WALLF_ABSLIGHTING, key);
continue; continue;
case NAME_lightfog:
Flag(sd->Flags, WALLF_LIGHT_FOG, key);
continue;
case NAME_nofakecontrast: case NAME_nofakecontrast:
Flag(sd->Flags, WALLF_NOFAKECONTRAST, key); Flag(sd->Flags, WALLF_NOFAKECONTRAST, key);
continue; continue;

View file

@ -744,6 +744,7 @@ enum
WALLF_CLIP_MIDTEX = 16, // Like the line counterpart, but only for this side. WALLF_CLIP_MIDTEX = 16, // Like the line counterpart, but only for this side.
WALLF_WRAP_MIDTEX = 32, // Like the line counterpart, but only for this side. WALLF_WRAP_MIDTEX = 32, // Like the line counterpart, but only for this side.
WALLF_POLYOBJ = 64, // This wall belongs to a polyobject. WALLF_POLYOBJ = 64, // This wall belongs to a polyobject.
WALLF_LIGHT_FOG = 128, // This wall's Light is used even in fog.
}; };
struct side_t struct side_t