mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-26 05:41:39 +00:00
Fixed a botched up merge that led to build errors.
This commit is contained in:
parent
367b5fbd01
commit
676e460731
1 changed files with 1 additions and 32 deletions
|
@ -185,9 +185,7 @@ void FLightDefaults::ApplyProperties(ADynamicLight * light) const
|
|||
if (m_additive) light->flags4 |= MF4_ADDITIVE;
|
||||
if (m_dontlightself) light->flags4 |= MF4_DONTLIGHTSELF;
|
||||
light->m_tickCount = 0;
|
||||
switch (m_type)
|
||||
{
|
||||
case PulseLight:
|
||||
if (m_type == PulseLight)
|
||||
{
|
||||
float pulseTime = float(m_Param / TICRATE);
|
||||
|
||||
|
@ -199,35 +197,6 @@ void FLightDefaults::ApplyProperties(ADynamicLight * light) const
|
|||
if (light->m_currentRadius <= 0) light->m_currentRadius = 1;
|
||||
}
|
||||
|
||||
case FlickerLight:
|
||||
case RandomFlickerLight:
|
||||
{
|
||||
float minrad = float(MIN(light->m_Radius[0], light->m_Radius[1]));
|
||||
float maxrad = float(MAX(light->m_Radius[0], light->m_Radius[1]));
|
||||
light->m_currentRadius = clamp(light->m_currentRadius, minrad, maxrad);
|
||||
break;
|
||||
}
|
||||
|
||||
case PointLight:
|
||||
light->m_currentRadius = float(light->m_Radius[0]);
|
||||
break;
|
||||
|
||||
case SectorLight:
|
||||
{
|
||||
float intensity;
|
||||
float scale = light->args[LIGHT_SCALE] / 8.f;
|
||||
|
||||
if (scale == 0.f) scale = 1.f;
|
||||
|
||||
intensity = light->Sector->lightlevel * scale;
|
||||
intensity = clamp<float>(intensity, 0.f, 255.f);
|
||||
|
||||
light->m_currentRadius = intensity;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
switch (m_attenuate)
|
||||
{
|
||||
case 0: light->flags4 &= ~MF4_ATTENUATE; break;
|
||||
|
|
Loading…
Reference in a new issue