light: add _nostaticlight key
This commit is contained in:
parent
22469857f0
commit
2d3aa22242
|
|
@ -80,6 +80,7 @@ public:
|
|||
lockable_vec3_t origin, color, mangle, projangle;
|
||||
lockable_string_t project_texture;
|
||||
lockable_string_t suntexture;
|
||||
lockable_bool_t nostaticlight;
|
||||
|
||||
light_formula_t getFormula() const { return static_cast<light_formula_t>(formula.intValue()); }
|
||||
|
||||
|
|
@ -123,7 +124,8 @@ public:
|
|||
mangle { "mangle", 0, 0, 0 }, // not transformed to vec
|
||||
projangle { "project_mangle", 20, 0, 0 }, // not transformed to vec
|
||||
project_texture { "project_texture", "" },
|
||||
suntexture { "suntexture", "" }
|
||||
suntexture { "suntexture", "" },
|
||||
nostaticlight { "nostaticlight", false }
|
||||
{
|
||||
VectorSet(spotvec, 0, 0, 0);
|
||||
|
||||
|
|
@ -140,7 +142,7 @@ public:
|
|||
&sun, //mxd
|
||||
&sunlight2, &sunlight3,
|
||||
&falloff, //mxd
|
||||
&origin, &color, &mangle, &projangle, &project_texture, &suntexture
|
||||
&origin, &color, &mangle, &projangle, &project_texture, &suntexture, &nostaticlight
|
||||
}};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1358,6 +1358,10 @@ GetDirectLighting(const mbsp_t *bsp, const globalconfig_t &cfg, raystream_t *rs,
|
|||
vec3_t surfpointToLightDir;
|
||||
float surfpointToLightDist;
|
||||
vec3_t color, normalcontrib;
|
||||
|
||||
if (entity.nostaticlight.boolValue()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip styled lights if "bouncestyled" setting is off.
|
||||
if (entity.style.intValue() != 0 && !cfg.bouncestyled.boolValue()) {
|
||||
|
|
@ -1698,6 +1702,9 @@ LightFace_Min(const mbsp_t *bsp, const bsp2_dface_t *face,
|
|||
if (entity.getFormula() != LF_LOCALMIN) {
|
||||
continue;
|
||||
}
|
||||
if (entity.nostaticlight.boolValue()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (CullLight(&entity, lightsurf)) {
|
||||
continue;
|
||||
|
|
@ -3255,6 +3262,8 @@ LightFace(const mbsp_t *bsp, bsp2_dface_t *face, facesup_t *facesup, const globa
|
|||
{
|
||||
if (entity.getFormula() == LF_LOCALMIN)
|
||||
continue;
|
||||
if (entity.nostaticlight.boolValue())
|
||||
continue;
|
||||
if (entity.light.floatValue() > 0)
|
||||
LightFace_Entity(bsp, &entity, lightsurf, lightmaps);
|
||||
}
|
||||
|
|
@ -3292,6 +3301,8 @@ LightFace(const mbsp_t *bsp, bsp2_dface_t *face, facesup_t *facesup, const globa
|
|||
{
|
||||
if (entity.getFormula() == LF_LOCALMIN)
|
||||
continue;
|
||||
if (entity.nostaticlight.boolValue())
|
||||
continue;
|
||||
if (entity.light.floatValue() < 0)
|
||||
LightFace_Entity(bsp, &entity, lightsurf, lightmaps);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -454,6 +454,10 @@ The following light properties correspond to these sunlight settings:
|
|||
.IP "\fB""_sunlight3"" ""n""\fP"
|
||||
Same as "_sunlight2", but for the lower hemisphere.
|
||||
|
||||
.IP "\fB""_nostaticlight"" ""n""\fP"
|
||||
Set to 1 to make the light compiler ignore this entity (prevents it from casting any light). e.g. could be useful with rtlights.
|
||||
|
||||
|
||||
.SH "OTHER INFORMATION"
|
||||
The "\\b" escape sequence toggles red text on/off, you can use this in any strings in the map file. e.g. "message" "Here is \\bsome red text\\b..."
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue