diff --git a/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs b/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs index 5c3ff3d2b4..ef22884a33 100644 --- a/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs +++ b/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs @@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits [Desc("Particles are drawn in squares when enabled, otherwise with lines.")] public readonly bool UseSquares = true; - [Desc("Works only with squares enabled. Size min. and max. value in pixels.")] + [Desc("Size / width of the particle in px.")] public readonly int[] ParticleSize = { 1, 3 }; [Desc("Scatters falling direction on the x-axis. Scatter min. and max. value in px/tick.")] @@ -294,7 +294,7 @@ namespace OpenRA.Mods.Common.Traits else { var tempPosTail = new float2(topLeft.X + item.PosX - currentWindXOffset, item.PosY - (item.Gravity * 2 / 3) + topLeft.Y); - Game.Renderer.WorldLineRenderer.DrawLine(tempPos, tempPosTail, item.Color, item.TailColor); + Game.Renderer.WorldRgbaColorRenderer.DrawLine(tempPos, tempPosTail, item.Size, item.TailColor); } } } diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 18a2847fa8..81d69d5a62 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -2694,6 +2694,14 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + // Added width support for line particles + if (engineVersion < 20151220 && node.Key == "WeatherOverlay") + { + var useSquares = node.Value.Nodes.FirstOrDefault(n => n.Key == "UseSquares"); + if (useSquares != null && !FieldLoader.GetValue("UseSquares", useSquares.Value.Value)) + node.Value.Nodes.Add(new MiniYamlNode("ParticleSize", "1, 1")); + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } diff --git a/mods/cnc/maps/gdi06/map.yaml b/mods/cnc/maps/gdi06/map.yaml index 8d2d3852e8..a1ddb13d91 100644 --- a/mods/cnc/maps/gdi06/map.yaml +++ b/mods/cnc/maps/gdi06/map.yaml @@ -1055,7 +1055,6 @@ Rules: WindTick: 150, 550 InstantWindChanges: false UseSquares: false - ParticleSize: 0, 0 ScatterDirection: 0, 0 Gravity: 8.00, 12.00 SwingOffset: 0, 0 @@ -1063,6 +1062,7 @@ Rules: SwingAmplitude: 0, 0 ParticleColors: 304074, 28386C, 202C60, 182C54 LineTailAlphaValue: 150 + ParticleSize: 1, 1 GlobalLightingPaletteEffect: Red: 0.75 Green: 0.85 diff --git a/mods/ra/maps/fort-lonestar/map.yaml b/mods/ra/maps/fort-lonestar/map.yaml index 1819dc21b3..95c9e7b09c 100644 --- a/mods/ra/maps/fort-lonestar/map.yaml +++ b/mods/ra/maps/fort-lonestar/map.yaml @@ -508,7 +508,6 @@ Rules: WindTick: 150, 550 InstantWindChanges: false UseSquares: false - ParticleSize: 0, 0 ScatterDirection: 0, 0 Gravity: 8.00, 12.00 SwingOffset: 0, 0 @@ -516,6 +515,7 @@ Rules: SwingAmplitude: 0, 0 ParticleColors: 304074, 28386C, 202C60, 182C54 LineTailAlphaValue: 150 + ParticleSize: 1, 1 GlobalLightingPaletteEffect: Red: 0.75 Green: 0.85