Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ This means that plugins that do binary code analysis (Orpheu for example) probab
| mp_show_radioicon | 1 | 0 | 1 | Show radio icon.<br/>`0` disabled<br/>`1` enabled |
| mp_show_scenarioicon | 0 | 0 | 1 | Show scenario icon in HUD such as count of alive hostages or ticking bomb.<br/>`0` disabled<br/>`1` enabled |
| mp_show_bomb_timer | 0 | 0 | 1 | Show the time until the planted bomb explodes on the HUD round timer.<br/>`0` disabled<br/>`1` enabled (when the bomb is planted, the round timer shows the C4 countdown) |
| mp_show_hintmessages | 1 | 0 | 1 | Send hint messages (Hint_*) to clients.<br/>`0` disabled (non-forced hints are suppressed server-side; forced hints, e.g. ReAPI `rg_hint_message` with override, still pass)<br/>`1` enabled |
| mp_old_bomb_defused_sound | 1 | 0 | 1 | Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused<br/>`0` disabled<br/>`1` enabled |
| showtriggers | 0 | 0 | 1 | Debug cvar shows triggers. |
| sv_alltalk | 0 | 0 | 5 | When players can hear each other ([further explanation](../../wiki/sv_alltalk)).<br/>`0` dead don't hear alive<br/>`1` no restrictions<br/>`2` teammates hear each other<br/>`3` Same as 2, but spectators hear everybody<br/>`4` alive hear alive, dead hear dead and alive.<br/>`5` alive hear alive teammates, dead hear dead and alive.
Expand Down
7 changes: 7 additions & 0 deletions dist/game.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ mp_show_scenarioicon "0"
// Default value: "0"
mp_show_bomb_timer "0"

// Send hint messages (Hint_*) to clients.
// 0 - disabled (non-forced hints suppressed server-side; forced hints still pass)
// 1 - enabled (default behavior)
//
// Default value: "1"
mp_show_hintmessages "1"

// Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused
// 0 - disabled (default behavior)
// 1 - enabled
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ cvar_t roundover = { "mp_roundover", "0", FCVAR_SERVER, 0.0f,
cvar_t forcerespawn = { "mp_forcerespawn", "0", FCVAR_SERVER, 0.0f, nullptr };
cvar_t show_radioicon = { "mp_show_radioicon", "1", 0, 1.0f, nullptr };
cvar_t show_scenarioicon = { "mp_show_scenarioicon", "0", FCVAR_SERVER, 0.0f, nullptr };
cvar_t show_hintmessages = { "mp_show_hintmessages", "1", 0, 1.0f, nullptr };
cvar_t old_bomb_defused_sound = { "mp_old_bomb_defused_sound", "1", 0, 1.0f, nullptr };
cvar_t item_staytime = { "mp_item_staytime", "300", FCVAR_SERVER, 300.0f, nullptr };
cvar_t legacy_bombtarget_touch = { "mp_legacy_bombtarget_touch", "1", 0, 1.0f, nullptr };
Expand Down Expand Up @@ -417,6 +418,7 @@ void EXT_FUNC GameDLLInit()
CVAR_REGISTER(&show_scenarioicon);
}

CVAR_REGISTER(&show_hintmessages);
CVAR_REGISTER(&old_bomb_defused_sound);
CVAR_REGISTER(&item_staytime);
CVAR_REGISTER(&legacy_bombtarget_touch);
Expand Down
1 change: 1 addition & 0 deletions regamedll/dlls/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ extern cvar_t roundover;
extern cvar_t forcerespawn;
extern cvar_t show_radioicon;
extern cvar_t show_scenarioicon;
extern cvar_t show_hintmessages;
extern cvar_t old_bomb_defused_sound;
extern cvar_t item_staytime;
extern cvar_t legacy_bombtarget_touch;
Expand Down
8 changes: 8 additions & 0 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8111,6 +8111,14 @@ bool EXT_FUNC CBasePlayer::__API_HOOK(HintMessageEx)(const char *pMessage, float
if (!bDisplayIfPlayerDead && !IsAlive())
return false;

#ifdef REGAMEDLL_ADD
// Server-side sibling of the client's _ah (auto-help) preference: suppresses
// non-forced hints only. bOverride still bypasses it, exactly as it already
// bypasses m_bShowHints, so ReAPI callers keep their existing escape hatch.
if (!bOverride && show_hintmessages.value == 0.0f)
return true;
#endif

if (bOverride || m_bShowHints)
return m_hintMessageQueue.AddMessage(pMessage, duration, true, nullptr);

Expand Down
Loading