Merge pull request #12713 from pchote/fix-paused-weather-scroll
Fix weather particle positions when scrolling while paused.
This commit is contained in:
@@ -263,15 +263,20 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
void UpdateWeatherOverlay(WorldRenderer wr)
|
void UpdateWeatherOverlay(WorldRenderer wr)
|
||||||
{
|
{
|
||||||
ParticlesCountLogic(wr);
|
if (!world.Paused)
|
||||||
|
ParticlesCountLogic(wr);
|
||||||
|
|
||||||
for (var i = 0; i < particleList.Count; i++)
|
for (var i = 0; i < particleList.Count; i++)
|
||||||
{
|
{
|
||||||
Particle tempParticle = particleList[i];
|
Particle tempParticle = particleList[i];
|
||||||
|
|
||||||
XAxisSwing(ref tempParticle);
|
if (!world.Paused)
|
||||||
WindLogic(ref tempParticle);
|
{
|
||||||
Movement(ref tempParticle);
|
XAxisSwing(ref tempParticle);
|
||||||
|
WindLogic(ref tempParticle);
|
||||||
|
Movement(ref tempParticle);
|
||||||
|
}
|
||||||
|
|
||||||
AntiScroll(ref tempParticle, wr);
|
AntiScroll(ref tempParticle, wr);
|
||||||
EdgeCheckReplace(ref tempParticle, wr);
|
EdgeCheckReplace(ref tempParticle, wr);
|
||||||
|
|
||||||
@@ -300,8 +305,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
void IRenderAboveWorld.RenderAboveWorld(Actor self, WorldRenderer wr)
|
void IRenderAboveWorld.RenderAboveWorld(Actor self, WorldRenderer wr)
|
||||||
{
|
{
|
||||||
if (!world.Paused)
|
UpdateWeatherOverlay(wr);
|
||||||
UpdateWeatherOverlay(wr);
|
|
||||||
|
|
||||||
DrawWeatherOverlay(wr);
|
DrawWeatherOverlay(wr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user