Permalink
Browse files

fix resume simulation/reload in the middle of subframe debugging (#330)

  • Loading branch information...
krawthekrow authored and jacob1 committed Sep 5, 2016
1 parent 2df333c commit 8de12d616efcc5104812657fa40ac92aeac0f62a
Showing with 9 additions and 1 deletion.
  1. +1 −1 src/gui/game/GameController.h
  2. +7 −0 src/gui/game/GameModel.cpp
  3. +1 −0 src/simulation/Simulation.cpp
@@ -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();

0 comments on commit 8de12d6

Please sign in to comment.