open-toontown/otp
Nicolas Sanchez c0aabf66e7 Display typed open-chat locally so the sender sees their own bubble
Reported in #31: when a player uses the typed chat box, everyone else
sees the chat bubble over their toon but they do not. Speedchat works
fine for the sender.

The asymmetry is in how the two paths broadcast. Speedchat goes through
the b_setSC family (b_setSC -> setSC + d_setSC), which calls the
receiver-side handler locally on the sender before sending the DC
update, so the sender's bubble appears. Typed chat in
TalkAssistant.sendOpenTalk only does sendUpdate('setTalk', ...) and
relies on the DC broadcast to reach other clients. The 'setTalk' field
is not echoed back to the originating client by the AI, so the
DistributedToon.setTalk handler that calls displayTalk never fires for
the sender's own message.

Mirror the speedchat pattern by also calling setChatAbsolute locally
after sendUpdate. This is the same call DistributedPlayer.setSC makes
when it displays speedchat for the sender, so the bubble behavior is
now identical between the two input paths.

Closes #31
2026-05-19 01:39:23 -05:00
..
ai all: replace pandac.PandaModules imports. 2022-12-16 20:40:57 -04:00
avatar avatar: Merged gotoSleep if statement 2023-11-09 02:38:31 +00:00
chat Display typed open-chat locally so the sender sees their own bubble 2026-05-19 01:39:23 -05:00
distributed distributed: Add _getMsgName for verbose logging 2023-01-10 22:45:55 -04:00
friends all: replace pandac.PandaModules imports. 2022-12-16 20:40:57 -04:00
launcher all: replace pandac.PandaModules imports. 2022-12-16 20:40:57 -04:00
level level: Remove UberZone from visibleZoneIds 2023-01-10 20:03:21 -04:00
login fix missing msgtypes 2023-04-23 02:21:37 -04:00
movement all: replace pandac.PandaModules imports. 2022-12-16 20:40:57 -04:00
namepanel all: replace pandac.PandaModules imports. 2022-12-16 20:40:57 -04:00
otpbase Merge branch 'develop' into enhancement/remove-pandac-pandamodules 2022-12-24 00:13:24 -04:00
otpgui general: push the 2013 TTO code 2019-11-02 18:27:54 -04:00
settings settings: Don't need to store result 2021-07-09 00:16:41 -04:00
snapshot ai: AI server progress 2019-11-10 19:46:41 -05:00
speedchat all: replace pandac.PandaModules imports. 2022-12-16 20:40:57 -04:00
status general: pain. 2019-11-08 23:55:55 -05:00
uberdog otp: fix whisper imports 2022-12-16 21:07:17 -04:00
web otp: initial work on python 3.x support 2019-12-30 01:00:16 -05:00
__init__.py general: push the 2013 TTO code 2019-11-02 18:27:54 -04:00