aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-04-07 18:04:49 +0200
committersD <stoned@derpymail.org>2020-04-07 18:04:49 +0200
commitca68537c61b64f40f0fa6a43f1fadb2671bfaf85 (patch)
tree40a08a45acef627482f11a7db2399b5996d7caa1 /webAO
parent4518ae6f35e907b4a08b741f2b2b8cdb94283f31 (diff)
same in tick
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 1a4d8db..3bcde46 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1695,6 +1695,10 @@ async changeBackground(position) {
* XXX: This relies on a global variable `this.chatmsg`!
*/
tick() {
+ if (this._animating) {
+ this.updater = setTimeout(() => this.tick(), UPDATE_INTERVAL);
+ }
+
const nameBox = document.getElementById("client_name");
const chatBox = document.getElementById("client_chat");
const chatContainerBox = document.getElementById("client_chatcontainer");
@@ -1703,11 +1707,7 @@ async changeBackground(position) {
const pairSprite = document.getElementById("client_pair_char");
const eviBox = document.getElementById("client_evi");
const shoutSprite = document.getElementById("client_shout");
- const chatBoxInner = document.getElementById("client_inner_chat");
-
- if (this._animating) {
- this.updater = setTimeout(() => this.tick(), UPDATE_INTERVAL);
- }
+ const chatBoxInner = document.getElementById("client_inner_chat");
// TODO: preanims sometimes play when they're not supposed to
if (this.textTimer >= this.shoutTimer && this.chatmsg.startpreanim) {