update .life properly when using particle debug shortcuts

This commit is contained in:
jacob1 2016-04-30 10:50:48 -04:00
parent 64f81000cd
commit 63ac47a270

View File

@ -42,15 +42,18 @@ void ParticleDebug::Debug(int mode, int x, int y)
} }
model->Log(logmessage.str(), false); model->Log(logmessage.str(), false);
if (sim->debug_currentParticle == 0)
{
sim->framerender = 1;
sim->BeforeSim();
sim->framerender = 0;
}
sim->UpdateParticles(debug_currentParticle, i); sim->UpdateParticles(debug_currentParticle, i);
if (i < NPART-1) if (i < NPART-1)
sim->debug_currentParticle = i+1; sim->debug_currentParticle = i+1;
else else
{ {
sim->AfterSim(); sim->AfterSim();
sim->framerender = 1;
sim->BeforeSim();
sim->framerender = 0;
sim->debug_currentParticle = 0; sim->debug_currentParticle = 0;
} }
} }