Skip to content

Commit

Permalink
Don't step the simulation back in time. See #409
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Mar 1, 2017
1 parent f239e53 commit d48e6da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/Sim.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,11 @@ define( function( require ) {

// Convert to seconds
var dt = elapsedTimeMilliseconds / 1000.0;
this.stepSimulation( dt );

// Don't run the simulation on steps back in time (see https://github.com/phetsims/joist/issues/409).
if ( dt >= 0 ) {
this.stepSimulation( dt );
}
},

/**
Expand Down

0 comments on commit d48e6da

Please sign in to comment.