Adjust PulseSlow light controller (Fixes #1963)

openmw-38
scrawl 9 years ago
parent a49058721e
commit 3bd2aaddea

@ -76,7 +76,7 @@ namespace SceneUtil
if(mType == LT_Pulse || mType == LT_PulseSlow) if(mType == LT_Pulse || mType == LT_PulseSlow)
{ {
cycle_time = 2.0f * pi; cycle_time = 2.0f * pi;
time_distortion = 20.0f; time_distortion = mType == LT_Pulse ? 20.0f : 4.f;
} }
else else
{ {
@ -114,9 +114,9 @@ namespace SceneUtil
else if(mType == LT_FlickerSlow) else if(mType == LT_FlickerSlow)
brightness = 0.75f + flickerAmplitude(mDeltaCount*slow)*0.25f; brightness = 0.75f + flickerAmplitude(mDeltaCount*slow)*0.25f;
else if(mType == LT_Pulse) else if(mType == LT_Pulse)
brightness = 1.0f + pulseAmplitude(mDeltaCount*fast)*0.25f; brightness = 0.7f + pulseAmplitude(mDeltaCount*fast)*0.3f;
else if(mType == LT_PulseSlow) else if(mType == LT_PulseSlow)
brightness = 1.0f + pulseAmplitude(mDeltaCount*slow)*0.25f; brightness = 0.7f + pulseAmplitude(mDeltaCount*slow)*0.3f;
static_cast<SceneUtil::LightSource*>(node)->getLight()->setDiffuse(mDiffuseColor * brightness); static_cast<SceneUtil::LightSource*>(node)->getLight()->setDiffuse(mDiffuseColor * brightness);
} }

Loading…
Cancel
Save