aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2026-04-02 18:26:19 +0200
committerDavid Skoland <davidskoland@gmail.com>2026-04-02 18:26:19 +0200
commit20810aa0d3dfac49e1f43fe84634f74f56374fcd (patch)
treec145ffad2450e2c365094534250295e91b4bd8e5 /webAO
parent10b413c0f0a31bc9476eed86812b6bb90f82caed (diff)
Fix preanims not playing on blank posts
The early return guard `textnow === chatmsg.content` was firing on the first tick for empty messages ("" === ""), short-circuiting the entire animation timeline before the preanim or shout phases could run. Now the guard also checks that both tick phases have completed before allowing the early exit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'webAO')
-rw-r--r--webAO/viewport/viewport.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/webAO/viewport/viewport.ts b/webAO/viewport/viewport.ts
index b37ff06..45cfc96 100644
--- a/webAO/viewport/viewport.ts
+++ b/webAO/viewport/viewport.ts
@@ -493,7 +493,7 @@ const viewport = (): Viewport => {
playSFX(sfxUrl, chatmsg.looping_sfx);
}
}
- if (textnow === chatmsg.content) {
+ if (textnow === chatmsg.content && !startFirstTickCheck && !startSecondTickCheck) {
return;
}
if (animating) {