Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further testing of light inheritance in EntityTest
Check that entities which derive from light (directly or through multiple levels) all have isLight() set correctly, but torch_brazier is not considered a light (it is a func_static with a light attached).
- Loading branch information
Matthew Mott
committed
Jan 30, 2021
1 parent
2625f29
commit 61dd80d
Showing
3 changed files
with
172 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
entityDef atdm:static_light_lit_base | ||
{ | ||
"inherit" "func_static" | ||
"editor_usage" "Base class for static lit light fixtures. Don't use." | ||
"editor_displayFolder" "Lights/Base Entities, DoNotUse" | ||
// use the tdm_light_holder script object to allow LightsOn(), LightsOff() and LightsToggle(): | ||
"scriptobject" "tdm_light_holder" | ||
"extinguished" "0" | ||
"AIUse" "AIUSE_LIGHTSOURCE" | ||
"lightType" "AIUSE_LIGHTTYPE_TORCH" | ||
} | ||
|
||
entityDef atdm:torch_wall_base | ||
{ | ||
"inherit" "atdm:static_light_lit_base" | ||
"model" "models/darkmod/lights/extinguishable/sq_torch.lwo" | ||
"editor_usage" "Base class for lit wall-mounted static torches. Do not use." | ||
"editor_displayFolder" "Lights/Base Entities, DoNotUse" | ||
|
||
"extinguished" "0" | ||
"noshadows_lit" "1" // turn off shadow when lit | ||
"noshadows" "1" // lit, so has no shadows | ||
|
||
// attach the light, so the torch can be re-lit by fire stims | ||
"def_attach" "light_torchflame_small" | ||
"pos_attach" "flame" // At the attach point called "flame"... | ||
"attach_pos_name_1" "flame" // ... which is defined here. | ||
"name_attach" "flame" // Give it a name to pass along spawnargs | ||
"attach_pos_origin_1" "11 0 15" // Offset the flame | ||
|
||
"skin" "torch_lit" | ||
"skin_lit" "torch_lit" | ||
"skin_unlit" "torch_unlit" | ||
} | ||
|
||
entityDef atdm:torch_brazier | ||
{ | ||
"inherit" "atdm:torch_wall_base" | ||
"editor_usage" "floor mounted, lit brazier" | ||
"editor_displayFolder" "Lights/Model Lights, Static/Fires" | ||
|
||
"model" "models/darkmod/lights/extinguishable/brazier.lwo" | ||
|
||
// attach the light, so the torch can be re-lit by fire stims | ||
"noshadows_lit" "1" // turn off shadow when lit | ||
"noshadows" "0" // unlit, so has shadows | ||
|
||
"attach_pos_origin_1" "0 0 10" // Offset the flame | ||
|
||
"def_attach" "light_cageflame_small" | ||
|
||
// "skin" "torch_lit" | ||
// "skin_lit" "torch_lit" | ||
// "skin_unlit" "torch_unlit" | ||
} | ||
|