diff --git a/bin/RabiClone.jar b/bin/RabiClone.jar index 2388f81..96cf330 100644 Binary files a/bin/RabiClone.jar and b/bin/RabiClone.jar differ diff --git a/src/sig/RabiClone.java b/src/sig/RabiClone.java index cc40a24..8f3ff4c 100644 --- a/src/sig/RabiClone.java +++ b/src/sig/RabiClone.java @@ -89,7 +89,7 @@ public class RabiClone{ while (true) { long timePassed = System.nanoTime()-lastGameTime; lastGameTime=System.nanoTime(); - double updateMult = 1/120d; + double updateMult = Math.min(1/120d,timePassed/1000000000d); handleGameControllers(); @@ -127,8 +127,6 @@ public class RabiClone{ OBJ.remove(i--); } } - - waitForNextFrame(); } } @@ -169,20 +167,4 @@ public class RabiClone{ } f.setSize(f.getWidth()*SIZE_MULTIPLIER,(int)((f.getWidth()*SIZE_MULTIPLIER)/1.77777777778d)); } - - private static void waitForNextFrame() { - long newTime = System.nanoTime(); - if (newTime-lastUpdate