aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien2016-05-23 12:21:48 +0200
committerPacien2016-05-23 12:21:48 +0200
commit48a5f902ea85c017127547a0920b8b970391cec5 (patch)
tree96e534781e0bf8da1778d50ca8e7e36b289ee1b8
parentfe53f0e12433938f9d7696b1d2bf6bda691e55f3 (diff)
downloadxblast-48a5f902ea85c017127547a0920b8b970391cec5.tar.gz
Fix 1/2 frame skip
-rw-r--r--src/ch/epfl/xblast/server/Server.java2
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 }