mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-03-23 15:50:37 +01:00
fix resume simulation/reload in the middle of subframe debugging (#330)
This commit is contained in:
parent
2df333c99f
commit
8de12d616e
@ -1,4 +1,4 @@
|
||||
#ifndef GAMECONTROLLER_H
|
||||
#ifndef GAMECONTROLLER_H
|
||||
#define GAMECONTROLLER_H
|
||||
|
||||
#include <queue>
|
||||
|
@ -843,6 +843,13 @@ void GameModel::SetUser(User user)
|
||||
|
||||
void GameModel::SetPaused(bool pauseState)
|
||||
{
|
||||
if(!pauseState && sim->debug_currentParticle > 0)
|
||||
{
|
||||
sim->UpdateParticles(sim->debug_currentParticle, NPART);
|
||||
sim->AfterSim();
|
||||
sim->debug_currentParticle = 0;
|
||||
}
|
||||
|
||||
sim->sys_pause = pauseState?1:0;
|
||||
notifyPausedChanged();
|
||||
}
|
||||
|
@ -1902,6 +1902,7 @@ void Simulation::create_arc(int sx, int sy, int dx, int dy, int midpoints, int v
|
||||
|
||||
void Simulation::clear_sim(void)
|
||||
{
|
||||
debug_currentParticle = 0;
|
||||
emp_decor = 0;
|
||||
emp_trigger_count = 0;
|
||||
signs.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user