|
@@ -88,8 +88,10 @@ public class SimulationManager extends Observable {
|
|
*/
|
|
*/
|
|
private void simulateTimeStep() {
|
|
private void simulateTimeStep() {
|
|
// Just simulate if timer is running
|
|
// Just simulate if timer is running
|
|
- if (endTime <= currentTime)
|
|
|
|
|
|
+ if (endTime <= currentTime){
|
|
stopSimulation();
|
|
stopSimulation();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (currentTime + duration <= endTime) {
|
|
if (currentTime + duration <= endTime) {
|
|
simulateTimeIntervall(currentTime, duration);
|
|
simulateTimeIntervall(currentTime, duration);
|
|
currentTime += duration;
|
|
currentTime += duration;
|