diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 517fd62a40..843333302d 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -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); }