diff options
| author | David Skoland <davidskoland@gmail.com> | 2026-04-02 18:26:19 +0200 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2026-04-02 18:26:19 +0200 |
| commit | 20810aa0d3dfac49e1f43fe84634f74f56374fcd (patch) | |
| tree | c145ffad2450e2c365094534250295e91b4bd8e5 | |
| parent | 10b413c0f0a31bc9476eed86812b6bb90f82caed (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>
| -rw-r--r-- | webAO/viewport/viewport.ts | 2 |
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) { |
