Skip to content

Add mp_show_hintmessages cvar to allow blocking hint messages server-side#1166

Open
belomaxorka wants to merge 1 commit into
rehlds:masterfrom
belomaxorka:feat/hint-messages-cvar
Open

Add mp_show_hintmessages cvar to allow blocking hint messages server-side#1166
belomaxorka wants to merge 1 commit into
rehlds:masterfrom
belomaxorka:feat/hint-messages-cvar

Conversation

@belomaxorka

Copy link
Copy Markdown

What

Adds a new cvar mp_show_hintmessages (default 1) that allows servers to disable sending hint messages (#Hint_*) to clients.

Why

Server operators often want to get rid of the tutorial-style hint popups (e.g. #Hint_you_have_the_bomb, #Hint_spotted_an_enemy, zone hints). Currently this requires a plugin that hooks RG_CBasePlayer_HintMessageEx and supersedes it. Since every hint goes through a single function, this is trivial to support natively.

How it works

All hint messages are routed through CBasePlayer::HintMessageEx() (both directly and via the HintMessage() wrapper) before being queued into m_hintMessageQueue. When mp_show_hintmessages is 0, HintMessageEx() returns false immediately, so nothing is queued and nothing is sent to the client. The check is under REGAMEDLL_ADD; default value 1 keeps vanilla behavior.

Edge cases

  • Center-print messages (e.g. #Got_bomb) are not affected - they are not hints and bypass the hint queue by design.
  • The API hookchain RG_CBasePlayer_HintMessageEx still fires as before; the cvar check is inside the hooked function body, so plugins keep working.
  • The client-side "Auto-Help" setting (m_bShowHints) is untouched; the cvar acts as a server-wide override on top of it.

Tested

Built Win32 Release (MSVC) and verified on a listen/dedicated ReHLDS server: with the cvar at 1 the bomb pickup hint is shown as usual; after mp_show_hintmessages 0 (changeable at runtime) no hints are delivered, while center messages remain intact.

Allows servers to suppress all Hint_* messages (HintMessageEx queue)
without a plugin. Default 1 keeps vanilla behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@belomaxorka belomaxorka changed the title Add mp_show_hintmessages cvar to allow blocking hint messages server-side Add mp_show_hintmessages cvar to allow blocking hint messages server-side Jul 4, 2026
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