aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorstonedDiscord <stoned@derpymail.org>2019-07-18 22:01:55 +0200
committerstonedDiscord <stoned@derpymail.org>2019-07-18 22:01:55 +0200
commit98fd50a88ff721e573278fd2710c6fc5d075f88a (patch)
treeac2f67c2dadbcaeffdb1e175a6f124be5019a919 /webAO
parenta9d9360faac5cce611acab620a1e4368028f5c01 (diff)
i love the js type system (not)
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/webAO/client.js b/webAO/client.js
index f417c5b..08f994f 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -462,9 +462,7 @@ class Client extends EventEmitter {
if (args[4] !== viewport.chatmsg.content) {
document.getElementById("client_inner_chat").innerHTML = "";
const chatmsg = {
- // pre: escape(args[2]),
- character: -1, // Will do a linear search
- preanim: escape(args[2]), // XXX: why again?
+ preanim: escape(args[2]), // get preanim
nameplate: args[3], // TODO: parse INI to get this info
name: args[3],
speaking: "(b)" + escape(args[4]),
@@ -1092,7 +1090,7 @@ class Viewport {
const chatBoxInner = document.getElementById("client_inner_chat");
// Flip the character
- if (this.chatmsg.flip === 1) {
+ if (this.chatmsg.flip === "1") {
charSprite.style.transform = "scaleX(-1)";
} else {
charSprite.style.transform = "scaleX(1)";
@@ -1131,7 +1129,7 @@ class Viewport {
if (this.textTimer >= this.shoutTimer && this.chatmsg.startpreanim) {
// Effect stuff
- if (this.chatmsg.flash === 2) {
+ if (this.chatmsg.flash === "2") {
// Shake screen
this.sfxaudio.pause();
this.sfxplayed = 1;
@@ -1140,7 +1138,7 @@ class Viewport {
$("#client_gamewindow").effect("shake", {
"direction": "up"
});
- } else if (this.chatmsg.flash === 1) {
+ } else if (this.chatmsg.flash === "1") {
// Flash screen
background.style.backgroundColor = "white";
this.sfxaudio.pause();