aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2018-06-23 22:00:55 +0200
committerTom Smeding <tom.smeding@gmail.com>2018-06-23 22:01:08 +0200
commit114502685ecbe9484aee3907ee8c28741bd5b27b (patch)
treef97602bb30c020ad08f65bf8b1f9f111f0adfa6d
parent1a24cdc54e683cb54af10fac6862643cc78ab4f4 (diff)
Fix infinite ballouts
Didn't notice this on my computer since localhost was too fast.
-rw-r--r--game.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/game.js b/game.js
index 77d4151..bd2b288 100644
--- a/game.js
+++ b/game.js
@@ -170,6 +170,7 @@ function startPhysicsLoop() {
}
if (ballX < -ballRadius) {
socket.emit("ballout");
+ stopPhysicsLoop();
}
}, interval * 1000);
}