Changed the game speed so that it wasn't running faster (Rounding the number of game cycles usually caused it to speed up). Save Load function SHOULD be working now

This commit is contained in:
Daniel Xie
2016-12-01 16:39:13 -06:00
parent d5d198cbb4
commit 2fe4e8a19a
2 changed files with 13 additions and 10 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ var Engine = {
var diff = _thisUpdate - Engine._lastUpdate;
//Divide this by cycle time to determine how many cycles have elapsed since last update
diff = Math.round(diff / Engine._idleSpeed);
diff = Math.floor(diff / Engine._idleSpeed);
if (diff > 0) {
//Update the game engine by the calculated number of cycles