From 9327eecd7b23c76b5a89e7ad6750e5680187a7c5 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Wed, 31 Jul 2019 22:28:02 -0400 Subject: [PATCH] Update gravity mask even while paused --- src/simulation/Simulation.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7c0a0f3c4..01b5a9dc6 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -5219,11 +5219,6 @@ void Simulation::BeforeSim() gravp = grav->gravp; gravmap = grav->gravmap; } - if(gravWallChanged) - { - grav->gravity_mask(); - gravWallChanged = false; - } if(emp_decor>0) emp_decor -= emp_decor/25+2; if(emp_decor < 0) @@ -5240,6 +5235,12 @@ void Simulation::BeforeSim() sandcolour = (int)(20.0f*sin((float)sandcolour_frame*(M_PI/180.0f))); sandcolour_frame = (sandcolour_frame+1)%360; + if (gravWallChanged) + { + grav->gravity_mask(); + gravWallChanged = false; + } + if (debug_currentParticle == 0) RecalcFreeParticles(true);