From 609e0d0f3ee33386577fa02d1d7853458c847418 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 5 Feb 2017 18:50:31 +0000 Subject: [PATCH] Fix weather particle positions when scrolling while paused. --- .../Traits/World/WeatherOverlay.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs b/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs index a07c012a34..054707a634 100644 --- a/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs +++ b/OpenRA.Mods.Common/Traits/World/WeatherOverlay.cs @@ -263,15 +263,20 @@ namespace OpenRA.Mods.Common.Traits void UpdateWeatherOverlay(WorldRenderer wr) { - ParticlesCountLogic(wr); + if (!world.Paused) + ParticlesCountLogic(wr); for (var i = 0; i < particleList.Count; i++) { Particle tempParticle = particleList[i]; - XAxisSwing(ref tempParticle); - WindLogic(ref tempParticle); - Movement(ref tempParticle); + if (!world.Paused) + { + XAxisSwing(ref tempParticle); + WindLogic(ref tempParticle); + Movement(ref tempParticle); + } + AntiScroll(ref tempParticle, wr); EdgeCheckReplace(ref tempParticle, wr); @@ -300,8 +305,7 @@ namespace OpenRA.Mods.Common.Traits void IRenderAboveWorld.RenderAboveWorld(Actor self, WorldRenderer wr) { - if (!world.Paused) - UpdateWeatherOverlay(wr); + UpdateWeatherOverlay(wr); DrawWeatherOverlay(wr); }