mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-22 12:01:09 +00:00
Only create lights for the actual static light things
This commit is contained in:
parent
c5d09682a0
commit
15b31f0526
1 changed files with 6 additions and 2 deletions
|
@ -289,6 +289,10 @@ void FLevel::CreateLights()
|
|||
{
|
||||
IntThing *thing = &Things[i];
|
||||
|
||||
// skip things that aren't actually static point lights or static spotlights
|
||||
if (thing->type != 9876 && thing->type != 9881)
|
||||
continue;
|
||||
|
||||
uint32_t lightcolor = 0xffffff;
|
||||
float lightintensity = 1.0f;
|
||||
float lightdistance = 0.0f;
|
||||
|
@ -310,11 +314,11 @@ void FLevel::CreateLights()
|
|||
{
|
||||
lightdistance = atof(key.value);
|
||||
}
|
||||
else if (!stricmp(key.key, "lightinnerangle"))
|
||||
else if (!stricmp(key.key, "lightinnerangle") && thing->type == 9881)
|
||||
{
|
||||
innerAngleCos = std::cos(atof(key.value) * 3.14159265359f / 180.0f);
|
||||
}
|
||||
else if (!stricmp(key.key, "lightouterangle"))
|
||||
else if (!stricmp(key.key, "lightouterangle") && thing->type == 9881)
|
||||
{
|
||||
outerAngleCos = std::cos(atof(key.value) * 3.14159265359f / 180.0f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue