Use a default of 1d instead of 0d in LightingGlobal if the necessary trait doesn't exist
This commit is contained in:
@@ -39,25 +39,25 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
|
|
||||||
public double Red
|
public double Red
|
||||||
{
|
{
|
||||||
get { return hasLighting ? lighting.Red : 0d; }
|
get { return hasLighting ? lighting.Red : 1d; }
|
||||||
set { if (hasLighting) lighting.Red = (float)value; }
|
set { if (hasLighting) lighting.Red = (float)value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public double Green
|
public double Green
|
||||||
{
|
{
|
||||||
get { return hasLighting ? lighting.Green : 0d; }
|
get { return hasLighting ? lighting.Green : 1d; }
|
||||||
set { if (hasLighting) lighting.Green = (float)value; }
|
set { if (hasLighting) lighting.Green = (float)value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public double Blue
|
public double Blue
|
||||||
{
|
{
|
||||||
get { return hasLighting ? lighting.Blue : 0d; }
|
get { return hasLighting ? lighting.Blue : 1d; }
|
||||||
set { if (hasLighting) lighting.Blue = (float)value; }
|
set { if (hasLighting) lighting.Blue = (float)value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public double Ambient
|
public double Ambient
|
||||||
{
|
{
|
||||||
get { return hasLighting ? lighting.Ambient : 0d; }
|
get { return hasLighting ? lighting.Ambient : 1d; }
|
||||||
set { if (hasLighting) lighting.Ambient = (float)value; }
|
set { if (hasLighting) lighting.Ambient = (float)value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user