Merge pull request #11641 from abcdefg30/particleDensity
Convert ParticleDensityFactor from a float to an int
This commit is contained in:
@@ -256,6 +256,18 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
// ParticleDensityFactor was converted from a float to an int
|
||||
if (engineVersion < 20160713 && node.Key == "WeatherOverlay")
|
||||
{
|
||||
var density = node.Value.Nodes.FirstOrDefault(n => n.Key == "ParticleDensityFactor");
|
||||
if (density != null)
|
||||
{
|
||||
var value = float.Parse(density.Value.Value, CultureInfo.InvariantCulture);
|
||||
value = (int)Math.Round(value * 10000, 0);
|
||||
density.Value.Value = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user