From 7656ad3d125e20d29ddb197a10469e372505340e Mon Sep 17 00:00:00 2001 From: Taryn Hill Date: Sun, 2 Aug 2015 10:26:15 -0500 Subject: [PATCH] Use a default of 1d instead of 0d in LightingGlobal if the necessary trait doesn't exist --- OpenRA.Mods.Common/Scripting/Global/LightingGlobal.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Scripting/Global/LightingGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/LightingGlobal.cs index 23d91491de..c97d6ae049 100644 --- a/OpenRA.Mods.Common/Scripting/Global/LightingGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/LightingGlobal.cs @@ -39,25 +39,25 @@ namespace OpenRA.Mods.Common.Scripting public double Red { - get { return hasLighting ? lighting.Red : 0d; } + get { return hasLighting ? lighting.Red : 1d; } set { if (hasLighting) lighting.Red = (float)value; } } public double Green { - get { return hasLighting ? lighting.Green : 0d; } + get { return hasLighting ? lighting.Green : 1d; } set { if (hasLighting) lighting.Green = (float)value; } } public double Blue { - get { return hasLighting ? lighting.Blue : 0d; } + get { return hasLighting ? lighting.Blue : 1d; } set { if (hasLighting) lighting.Blue = (float)value; } } public double Ambient { - get { return hasLighting ? lighting.Ambient : 0d; } + get { return hasLighting ? lighting.Ambient : 1d; } set { if (hasLighting) lighting.Ambient = (float)value; } } }