Quake Live Steam Mapping Round 306
May 25, 2026 ยท View on GitHub
Scope: chat-area input, messagemode / messagemode2, console-originated
say, and qagame say / team/tell chat formatting.
Evidence Walk
- Engine owner:
quakelive_steam.exe.0x004B3550opens public chat: clears the chat field, setschat_playerNum = -1, clears reply/team latches, selects width73or the cgame chat-width export, togglesKEYCATCH_MESSAGE, and calls the cgame chat-down export.0x004B35C0opens team chat with the same setup, sets the team latch, and subtracts five visible columns from the cgame/fallback width.0x004B79B0owns message submission. Escape clears the catcher and field before chat-up. Enter formatsreply,tell,say_team, orsay, then calls chat-up before clearing the catcher and field.0x004B7660owns console-line entry. Withcl_allowConsoleChat = 0, bare text is prefixed into a command; with it enabled, bare text emitscmd say.
- Game owner:
qagamex86.dll.0x10041450is the retail-only chat token expander carried in the symbol map asG_ExpandChatTokens. It copies spectator text verbatim, but for live players expands##,#a,#h, and#win team/tell chat.0x10041760isG_Say. It emits the retail truncation diagnostic when input exceedsMAX_SAY_TEXT, runs the token expander for team/tell modes, then applies the non-teamsay_teamdowngrade, logssay:/sayteam:/tell:flows, and sendschatortchatpayloads throughG_SayTo.
Source Reconstruction
src/code/client/cl_keys.c- Reordered the Enter branch in
Message_Keyso the cgameCG_CHAT_UPcallback fires before the message catcher is cleared, matching the retail HLIL ordering at0x004B7ACF -> 0x004B7AE0.
- Reordered the Enter branch in
src/code/game/g_cmds.c- Added
G_ExpandChatTokensplus bounded append helpers. - Reconstructed Quake Live team/tell token expansion:
##-> literal##a-> current armor#h-> current health, clamped to0below one#w-> current weapon name, with ammo count for non-gauntlet weapons
- Preserved the retail expansion-before-downgrade ordering by keeping the original chat mode separate from the delivery mode.
- Added the retail
G_Say: truncate at %d charactersdiagnostic before the bounded say-buffer copy.
- Added
Verification Added
tests/test_cl_console_cgame_parity.py- Asserts the retail Enter-path chat-up, catcher-clear, field-clear order.
tests/test_game_helper_seam_parity.py- Asserts source coverage for
G_ExpandChatTokens, the#token cases, weapon/ammo formatting, overflow diagnostic, and the symbol/HLIL evidence anchors forG_ExpandChatTokensandG_Say.
- Asserts source coverage for
Open Edges
- The current source still preserves repository-specific muted-chat policy in
G_SayTo/G_Say. This round did not attempt to replace that policy because the existingg_allTalkandg_teamSpecSayEnabletests document it as an intentional reconstruction layer.