From 99d6cd425e9f98f25e4c1929e7123ad6f9adad4b Mon Sep 17 00:00:00 2001 From: Bumaire <194399581+Bruma1re@users.noreply.github.com> Date: Sat, 25 Oct 2025 23:56:03 +0100 Subject: IC: treat empty preanim string as no preanim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When an emote is defined with empty preanimation string, such as
EmoteName##emote#, and a user selects "Preanim," WebAO tries to look up
a file with an empty name instead of disabling preanimation. This commit fixes this, matching AO2 client behavior and not requiring
character makers to put a magic "-" preanimation in char.ini. --- webAO/viewport/utils/handleICSpeaking.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'webAO/viewport') diff --git a/webAO/viewport/utils/handleICSpeaking.ts b/webAO/viewport/utils/handleICSpeaking.ts index bae4986..b037e69 100644 --- a/webAO/viewport/utils/handleICSpeaking.ts +++ b/webAO/viewport/utils/handleICSpeaking.ts @@ -168,7 +168,8 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => { if ( client.viewport.getChatmsg().type === 1 && - client.viewport.getChatmsg().preanim !== "-" + client.viewport.getChatmsg().preanim !== "-" && + client.viewport.getChatmsg().preanim !== "" ) { //we have a preanim chatContainerBox.style.opacity = "0"; -- cgit