Release v0.15.13.0
This commit is contained in:
@@ -98,12 +98,10 @@ namespace Barotrauma
|
||||
private IEnumerable<object> DimLight(LightSource light)
|
||||
{
|
||||
float currBrightness = 1.0f;
|
||||
float startRange = light.Range;
|
||||
|
||||
while (light.Color.A > 0.0f && flashDuration > 0.0f)
|
||||
{
|
||||
light.Color = new Color(light.Color.R, light.Color.G, light.Color.B, currBrightness);
|
||||
currBrightness -= (1.0f / flashDuration) * CoroutineManager.DeltaTime;
|
||||
light.Color = new Color(light.Color.R, light.Color.G, light.Color.B, (byte)(currBrightness * 255));
|
||||
currBrightness -= 1.0f / flashDuration * CoroutineManager.DeltaTime;
|
||||
|
||||
yield return CoroutineStatus.Running;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user