Fix weather particle positions when scrolling while paused.

This commit is contained in:
Paul Chote
2017-02-05 18:50:31 +00:00
parent b018c3d837
commit 609e0d0f3e

View File

@@ -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);
}