Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Added a new UDMF sidedef flag: lightfog.

git-svn-id: http://mancubus.net/svn/hosted/zdoom/zdoom/trunk@3933 a95907f1-e10c-0410-b46f-9e587ccb1026
  • Loading branch information...
commit dfc541fdf5743e7e28c1daaf0c777326a525f1c8 1 parent 30dd4e1
rheit authored
View
3  specs/udmf_zdoom.txt
@@ -141,6 +141,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
light = <integer>; // This side's light level. Default is 0.
lightabsolute = <bool>; // true = 'light' is an absolute value. Default is
// 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.
smoothlighting = <bool>; // Use smooth fake contrast.
clipmidtex = <bool>; // Side's mid textures are clipped to floor and ceiling.
View
1  src/namedef.h
@@ -448,6 +448,7 @@ xx(scalex_bottom)
xx(scaley_bottom)
xx(light)
xx(lightabsolute)
+xx(lightfog)
xx(nofakecontrast)
xx(smoothlighting)
xx(blockprojectiles)
View
8 src/p_sectors.cpp
@@ -996,10 +996,10 @@ int side_t::GetLightLevel (bool foggy, int baselight, bool noabsolute, int *pfak
baselight += rel;
}
}
- if (!(Flags & WALLF_ABSLIGHTING))
- {
- baselight += this->Light;
- }
+ }
+ if (!(Flags & WALLF_ABSLIGHTING) && (!foggy || (Flags & WALLF_LIGHT_FOG)))
+ {
+ baselight += this->Light;
}
return baselight;
}
View
4 src/p_udmf.cpp
@@ -1053,6 +1053,10 @@ class UDMFParser : public UDMFParserBase
Flag(sd->Flags, WALLF_ABSLIGHTING, key);
continue;
+ case NAME_lightfog:
+ Flag(sd->Flags, WALLF_LIGHT_FOG, key);
+ continue;
+
case NAME_nofakecontrast:
Flag(sd->Flags, WALLF_NOFAKECONTRAST, key);
continue;
View
1  src/r_defs.h
@@ -744,6 +744,7 @@ enum
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_POLYOBJ = 64, // This wall belongs to a polyobject.
+ WALLF_LIGHT_FOG = 128, // This wall's Light is used even in fog.
};
struct side_t
Please sign in to comment.
Something went wrong with that request. Please try again.