aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstonedDiscord <10584181+stonedDiscord@users.noreply.github.com>2021-02-16 13:39:50 +0100
committerstonedDiscord <10584181+stonedDiscord@users.noreply.github.com>2021-02-16 13:39:50 +0100
commit3ef74cdf2a56012ca629e457767489ee1ea9672a (patch)
treef1f720c66cfa75f2460b4aeb827d6d44237eabb8
parentfa7d03b900cd5f96a42dc98d5822334c7759df7e (diff)
always shift the character to make horizontal offsets work
-rw-r--r--webAO/client.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/webAO/client.js b/webAO/client.js
index fbe5b68..08bc3ec 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1985,6 +1985,10 @@ async changeBackground(position) {
charLayers.style.transform = "scaleX(1)";
}
+ // Shift by the horizontal offset
+ pairLayers.style.left = this.chatmsg.other_offset + "%";
+ charLayers.style.left = this.chatmsg.self_offset + "%";
+
// flip the paired character
if (this.chatmsg.other_flip === 1) {
pairLayers.style.transform = "scaleX(-1)";
@@ -2091,12 +2095,9 @@ async changeBackground(position) {
}
if (this.chatmsg.other_name) {
- pairLayers.style.left = this.chatmsg.other_offset + "%";
- charLayers.style.left = this.chatmsg.self_offset + "%";
pairLayers.style.opacity = 1;
} else {
pairLayers.style.opacity = 0;
- charLayers.style.left = 0;
}
this.chatmsg.startpreanim = false;
@@ -2138,16 +2139,11 @@ async changeBackground(position) {
shoutSprite.style.animation = "";
}
- if (extrafeatures.includes("cccc_ic_support")) {
- if (this.chatmsg.other_name) {
- pairLayers.style.left = this.chatmsg.other_offset + "%";
- charLayers.style.left = this.chatmsg.self_offset + "%";
- this.setEmote(pairName,pairEmote,"(a)",true);
- pairLayers.style.opacity = 1;
- } else {
- pairLayers.style.opacity = 0;
- charLayers.style.left = 0;
- }
+ if (this.chatmsg.other_name) {
+ this.setEmote(pairName,pairEmote,"(a)",true);
+ pairLayers.style.opacity = 1;
+ } else {
+ pairLayers.style.opacity = 0;
}
this.setEmote(charName,charEmote,"(b)",false);