Skip to content

Commit

Permalink
Merge pull request #242 from caleb-mabry/fix-additive
Browse files Browse the repository at this point in the history
Fix Additive
  • Loading branch information
stonedDiscord authored Sep 29, 2024
2 parents 9923836 + 7ef85f8 commit 0557ccf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 4 additions & 6 deletions webAO/packets/handlers/handleMS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import { client, extrafeatures, UPDATE_INTERVAL } from "../../client";
import { handleCharacterInfo } from "../../client/handleCharacterInfo";
import { resetICParams } from "../../client/resetICParams";
import { prepChat, safeTags } from "../../encoding";
import { handle_ic_speaking } from '../../viewport/utils/handleICSpeaking'
import { handle_ic_speaking } from "../../viewport/utils/handleICSpeaking";
/**
* Handles an in-character chat message.
* @param {*} args packet arguments
*/
* Handles an in-character chat message.
* @param {*} args packet arguments
*/
export const handleMS = (args: string[]) => {
// TODO: this if-statement might be a bug.
if (args[4] !== client.viewport.getChatmsg().content) {
document.getElementById("client_inner_chat")!.innerHTML = "";

const char_id = Number(args[9]);
const char_name = safeTags(args[3]);

Expand Down
4 changes: 3 additions & 1 deletion webAO/viewport/utils/handleICSpeaking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => {
: client.viewport.getChatmsg().nameplate!;

// Clear out the last message
chatBoxInner.innerText = client.viewport.getTextNow();
if (!client.viewport.getChatmsg().additive) {
chatBoxInner.innerText = client.viewport.getTextNow();
}
nameBoxInner.innerText = displayname;

if (client.viewport.getLastCharacter() !== client.viewport.getChatmsg().name) {
Expand Down

0 comments on commit 0557ccf

Please sign in to comment.