diff options
author | Pacien | 2016-05-23 12:21:48 +0200 |
---|---|---|
committer | Pacien | 2016-05-23 12:21:48 +0200 |
commit | 48a5f902ea85c017127547a0920b8b970391cec5 (patch) | |
tree | 96e534781e0bf8da1778d50ca8e7e36b289ee1b8 | |
parent | fe53f0e12433938f9d7696b1d2bf6bda691e55f3 (diff) | |
download | xblast-48a5f902ea85c017127547a0920b8b970391cec5.tar.gz |
Fix 1/2 frame skip
-rw-r--r-- | src/ch/epfl/xblast/server/Server.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ch/epfl/xblast/server/Server.java b/src/ch/epfl/xblast/server/Server.java index 015d771..4674cbb 100644 --- a/src/ch/epfl/xblast/server/Server.java +++ b/src/ch/epfl/xblast/server/Server.java | |||
@@ -294,7 +294,7 @@ public class Server { | |||
294 | 294 | ||
295 | while (!gameState.isGameOver()) { | 295 | while (!gameState.isGameOver()) { |
296 | long computationStartTime = System.nanoTime(); | 296 | long computationStartTime = System.nanoTime(); |
297 | gameState = updateGameState(updateGameState(gameState)); | 297 | gameState = updateGameState(gameState); |
298 | broadcastGameState(gameState); | 298 | broadcastGameState(gameState); |
299 | Time.sleep(REFRESH_RATE - (computationStartTime - System.nanoTime())); | 299 | Time.sleep(REFRESH_RATE - (computationStartTime - System.nanoTime())); |
300 | } | 300 | } |