Skip to content

Hide the spectator mode label, Press DUCK, centre text and two overview icons (part of #677) - #714

Merged
ccoventry merged 10 commits into
devfrom
feat/hide-spectator-text-677
Oct 22, 2026
Merged

ccoventry merged 10 commits into
devfrom
feat/hide-spectator-text-677

Conversation

@ccoventry

@ccoventry ccoventry commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Release note: New: hide the spectator camera's mode label and the green "Press DUCK for Spectator Menu" line (ds_spec_hide_text), centre-screen server text (ds_hud_hide_center_text), and the overview map's camera icon (ds_hud_overview_team_marker 2) and speaker icon (ds_hud_overview_hide_speaker).

This builds rows 1, 2, 3, 4 and 6 of #677. Each is a new setting or value that defaults to off. A setting patches only while it's on and puts the original bytes back when it's off. The bytes are checked every frame.

Names follow the signed-off table on #555 (#719's ds_<area>_ layout). None of these names shipped, so old_names.rs gets no entries; console_prefix's test lists them as added since #555.

Row What disappears Setting How
1 The camera mode name, centred just above the bottom bar ("Locked Chase Cam", "First Person"…) ds_spec_hide_text 1 The direct call MsgFunc_TextMsg at client+0x38a20 becomes add esp,0xc; nop; nop. The callee is ret 0xc on all 4 returns, and nothing after the call reads eax or the flags. The server's own copy (a TextMsg with #Spec_Mode1..4) is dropped in clan_text's TextMsg filter.
2 The green "Press DUCK for Spectator Menu" same ret on the #Spec_Duck helper at +0x84780. All 4 callers pop their own argument.
3 The camera icon on the overview map ds_hud_overview_team_marker 2 (new value) The draw's own "no sprite" exit at +0x2f43d becomes jmp. Works in POV and HLTV.
4 The speaker icon on a player's overview blip ds_hud_overview_hide_speaker 1 Skips that block (jmp +0x2f31e over +0x2f287). The player icon stays.
6 Server centre text (TextMsg destination 4: plugin countdowns, notices) ds_hud_hide_center_text 1 Hangs off clan_text's existing TextMsg hook, so destinations 1–3 still come through. Turning it on also clears a centre line already on screen.

Rows 3 and 4 stay invisible on installs where sprites/spec_camera.spr and mapsprites/speakerIcon.spr are blanked. Once these settings work for you, those blank files can go.

Docs:

  • goldsrc_hud_elements.md and hudelement.rs now name the second centre-text queue (+0x3a830), so vgui2print hides all centre text.
  • hide_asset.rs no longer claims voice.rs hides the speaker icon.
  • Commands.txt, dodstudio_commands.md and the regenerated console_commands_data.js have the new names.

Tests

  • Unit tests: goldsrc-hooks i686 passes (698), including the test that no name is the start of another. Workspace tests pass, and npm run test:unit passes (602).
  • Lint and format: clippy 1.98.1 (-D warnings) is clean for the workspace and for i686, and fmt is clean.
  • tools/verify_hide_text_offsets.py: passes on PRE's and POST's client.dll, which are byte-identical.
  • In game, PRE and POST (Brain account): see the comment below.

Test it yourself (PRE, then POST)

Test DLL: local\test-714\dodstudio_goldsrc_hooks.dll. For POST, open the demos as "../../Half-Life - PRE-Anniversary for Movies/dod/<demo>".

  1. POV death: viewdemo wsod25_grp3_h1_element, then ds_hud_hide_scoreboard 1 and ds_demo_seek_to 1548. About 6 s in, the player dies and "Press DUCK for Spectator Menu" shows. Run ds_spec_hide_text 1, seek to 1548 again: no green line this time. The kill feed and HUD look the same.
  2. Camera mode name: viewdemo wsod25_grp2_h1_hltv, then ds_demo_seek_to 900 and spec_mode 4. spec_mode 3 shows "Free Look" above the bottom bar, and spec_mode 4 shows "First Person". With ds_spec_hide_text 1, neither shows.
  3. Overview camera icon (same HLTV demo, in first person): _cl_minimap 2. ds_hud_overview_team_marker 1 shows the team camera icon on the map, and 2 removes it. The player icons stay.
  4. Speaker icon: ds_hud_overview_hide_speaker 1 while someone on the map talks.
  5. Centre text: ds_hud_hide_center_text 1. The hook log reads center_text: hid "..." for each line it drops.

Not covered: the second direct caller of MsgFunc_TextMsg (viewport table entry 13, +0x20480), which is noted in center_text.rs; the engine's own svc_centerprint (row 8); and VGUI menus (row 5).

Part of #677

🤖 Generated with Claude Code

…e text and two overview icons (#677)

Rows 1, 2, 3, 4 and 6 of #677, all found offline in client.dll (one file,
identical in every install) and not yet checked in the game:

- dodstudio_hide_spectator_text: the camera mode name (CHudSpectator::SetMode's
  direct call to MsgFunc_TextMsg becomes add esp, 0xc) and the green "Press
  DUCK for Spectator Menu" (a ret at the #Spec_Duck helper). Patched while 1,
  restored at 0.
- dodstudio_hud_map_team_marker 2: no camera icon on the overview map (the
  draw's own no-sprite je becomes a jmp), POV and HLTV.
- dodstudio_hud_map_hide_speaker: skips the speaker icon on players'
  overview blips; the player icons stay.
- dodstudio_hide_center_text: drops TextMsg destination 4, from clan_text's
  existing TextMsg handler; ends the centre line showing when turned on.

tools/verify_hide_text_offsets.py re-derives every site from the Rust and a
real client.dll. Docs: dodstudio_commands.md, Commands.txt, the vgui2print
section of goldsrc_hud_elements.md and hudelement.rs (it also takes all
centre text), and hide_asset.rs's wrong voice.rs claim.

Part of #677

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Smoke test on PRE (Brain account, HLTV demo wsod25_grp2_h1_hltv, test DLL local\test-677\): I turned all four settings on, switched spec_mode and played on for 20 s, then turned them all off again.

  • No crash.
  • Each setting logs its on and off line, and putting the bytes back works.
  • _cl_minimap 1 didn't bring up the overview in this view, so the two overview patches have not been exercised in a draw yet. They still need the overview open, with the blank sprites restored.

ccoventry and others added 2 commits October 11, 2026 22:45
…xt-677

# Conflicts:
#	docs/dodstudio_commands.md
#	goldsrc-hooks/src/commands.rs
#	goldsrc-hooks/src/lib.rs
#	goldsrc-hooks/ui/Commands.txt
#	studio/src/console_commands_data.js
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Self-check (PRE, Brain account, this PR's DLL after tonight's dev merge, 2dfcc1b): wsod25_grp3_h1_element, 10 s from 25:48 (1548-1558 s on the demo player's clock: the POV player's death, the spectator camera and the respawn) recorded at 30 fps by the hook's schedule, so both runs cover the same 300 demo frames. Counted the green text pixels (G > 140, R and B < 110) in the middle band of each frame.

run frames frames with the green line (> 300 px) peak green pixels
dodstudio_hide_spectator_text 0 300 81 (frames 219-299, "Press DUCK for Spectator Menu" written out below the centre, still up after the respawn) 1219
dodstudio_hide_spectator_text 1 300 0 0

Kill feed, HUD and the red death flash are the same in both runs. Only row 2 (the green line) was measured; the camera mode name (row 1), the two overview icons and the centre text were not part of this check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Test pass 2026-10-13: merged dev in (conflict in docs/dodstudio_commands.md: kept this PR's team-marker row and dev's run_in_background / stay_behind / screen-effects rows; regenerated console_commands_data.js). CI green; locally hooks i686 517 tests, host + i686 clippy clean, npm unit 372.
Live test still needed: PRE and POST.

@ccoventry

Copy link
Copy Markdown
Owner Author

In-game check on PRE (Brain account, DLL built from #717's branch which includes this PR; frames in local/game-probe/677-pre):

  • Row 1: wsod25_grp1_h1_hltv, spec_mode 3 shows "Free Look" with the setting off; with dodstudio_hide_spectator_text 1 a spec_mode 4 change shows no mode name.
  • Row 2: wsod25_grp3_h1_element at 25:45-25:57, "Press DUCK for Spectator Menu" is on screen with the setting off and gone with it on; kill feed and HUD unchanged.
  • Row 6 (centre text): the engine half from Hide server HUD text and engine centre text (part of #677) #717 installs (log: svc_centerprint hidden), but the "Game paused" moment in wsod25_grp1_h1_hltv wasn't in my 10:28-10:38 clip either; still to find the right time.
    Rows 3 and 4 not checked (blank sprites). POST run to follow.

…xt-677

# Conflicts:
#	docs/dodstudio_commands.md
#	studio/src/console_commands_data.js
@ccoventry

Copy link
Copy Markdown
Owner Author

Merged dev in (6a178ce); conflicts in docs/dodstudio_commands.md and studio/src/console_commands_data.js, resolved by keeping both sides' rows (this PR's team_marker/hide_speaker text, dev's pov_live_bob and newer stay_behind text) and regenerating the data file with console_names.py; local tests/clippy/fmt/npm unit pass, CI green; test DLL rebuilt at local\test-714\

ccoventry and others added 3 commits October 19, 2026 11:10
Both sides kept in commands.rs, lib.rs, Commands.txt and
dodstudio_commands.md (voice_menus, spray and player_overrides from dev
beside this branch's center_text, spectator_text and overview_speaker).
dodstudio_hud_map_team_marker keeps its 0-2 values in dev's wording.
console_commands_data.js regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A demo carries the mode name ("First Person") as a #Spec_Mode TextMsg to
the centre at every POV death, besides the game's own SetMode call. In
game it still showed with dodstudio_hide_spectator_text 1; clan_text's
TextMsg filter now asks spectator_text for it, as it asks center_text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Review and in-game check (unattended pass): ready to merge. Head 56f00886.

Branch

  • Merged dev in. No conflicts.
  • Regenerated console_commands_data.js.

One fix, pushed here (56f00886)

  • In demos the camera mode name also comes as an ordinary server TextMsg (destination 4, key #Spec_Mode1..4) at every POV death and every HLTV mode change. The SetMode call patch never sees that one.
  • In game, "First Person" still showed with dodstudio_hide_spectator_text 1 (PRE, wsod25_grp3_h1_element).
  • clan_text's TextMsg filter now asks spectator_text::hide_text_msg for it, as it already asks center_text.
  • The docs say where the name sits: centred just above the bottom bar, not in the middle. They also say hide_center_text takes the server's copy.
  • New unit test added.

Checked

  • Unit tests: goldsrc-hooks i686 pass (687).
  • Lint and format: clippy 1.98.1 clean for i686 and host, -D warnings. fmt clean.
  • JS: npm run test:unit passes (585).
  • Verify scripts: verify_hide_text_offsets.py, verify_hudelements.py and verify_msglog_table.py pass on PRE and POST.
  • Code review:
    • Every patch keeps its stock bytes and writes them back at 0.
    • It refuses to write over bytes it doesn't recognise.
    • It runs only from commands::poll, the game's thread, so there's never a second writer.
    • No hw.dll patches in this PR.
    • New names use console_name!, are cvars named for the action, and default to 0. The prefix test covers them.

In game (Brain account), PRE and POST, local\test-714

  • POV deaths (wsod25_grp3_h1_element): with 0, "Press DUCK for Spectator Menu" and "First Person" show. With 1, both are gone.
  • HLTV (wsod25_grp1_h1_hltv, spec_mode 3/2): "Free Look" and "Free Chase Cam" show with 0 and are gone with 1.
  • dodstudio_hide_center_text 1:
    • The log reads center_text: hid "#Spec_Mode4" and "#game_switch_teams_once" (monday-wsod25_r07_m2_h2).
    • On screen the clan countdown shares that centre line, so the switch-teams line itself couldn't be told apart.
  • Overview rows 3 and 4: both cvars apply and revert, and nothing crashed on either build.
    • I didn't see the icons on screen: +map showed no overview in demo playback.

Screenshots: local\game-probe\714\.

ccoventry and others added 2 commits October 21, 2026 03:39
Brings in #719's ds_<area>_ rename. The settings this PR adds take
their names from the signed-off table on #555:

- hide_spectator_text -> ds_spec_hide_text
- hide_center_text -> ds_hud_hide_center_text
- hud_map_hide_speaker -> ds_hud_overview_hide_speaker

ds_hud_overview_team_marker gains 2 (no camera icon). None of these
names shipped, so old_names.rs gets no entries; console_prefix's test
lists them as names added since #555. Commands.txt, dodstudio_commands.md
and console_commands_data.js (regenerated) carry the new names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xt-677

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Merged dev and took the #555 names. In-game check on PRE and POST (Brain account). Head 00ba689d.

Branch

Checked locally: hooks i686 tests (698), workspace tests, clippy 1.98.1 for the workspace and i686, fmt, and npm unit tests (602) all pass.

In game: DLL from 3621068b (before #898; the only change since is #898's scope default). viewdemo, with frames in local\review-images\714\.

check PRE POST
POV death (wsod25_grp3_h1_element from 1548 s, 11 s of HLAE frames, scoreboard hidden): frames with the green "Press DUCK" line off 30 · ds_spec_hide_text 1 0 · ds_hud_hide_center_text 1 37 (not its job) off 26 · 0 · 35
Server copy of the mode name with ds_hud_hide_center_text 1 log: center_text: hid "#Spec_Mode4" same
HLTV mode name (wsod25_grp2_h1_hltv, spec_mode 3/4) off: "Free Look", "First Person". On: neither same
ds_hud_overview_team_marker with _cl_minimap 2, in first person 0: no icon (the blanked spec_camera.spr). 1: team camera icon. 2: none same
ds_hud_overview_hide_speaker 0/1 applies and reverts (log); no speaker icon in either grab, since nobody was talking same

Nothing else on screen changed between 0 and 1. There were no crashes, and no "not applied" lines in either log.

Test DLL: local\test-714\dodstudio_goldsrc_hooks.dll (final head).

Frames that a POV setting turned on after the green line was already up still show that line until it times out (documented). The counts above start at frame 50, after the death.

@ccoventry
ccoventry merged commit bfa09b7 into dev Oct 22, 2026
5 checks passed
@ccoventry
ccoventry deleted the feat/hide-spectator-text-677 branch October 22, 2026 02:56
ccoventry added a commit that referenced this pull request Oct 22, 2026
… Delay hides while Seek Between Clips is on; pre-roll 5 s, post-roll 1 s

Clean clips: ds_spec_hide_text 1, ds_hud_hide_center_text 1, ds_hud_overview_hide_speaker 0, ds_view_hide_screen_shake 1. Initial Delay only applies to patched demos; the hook waits for the demo itself. New installs start with a 5 s pre-roll and 1 s post-roll. Also rustfmt for the lib.rs import list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant