Skip to content

Commit

Permalink
Client: Add +use slowdown setting (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Oct 6, 2024
1 parent 71f577d commit d92707c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game/client/hud_redraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern ConVar zoom_sensitivity_ratio;
ConVar hud_colortext("hud_colortext", "1", FCVAR_BHL_ARCHIVE);
ConVar hud_takesshots("hud_takesshots", "0", FCVAR_ARCHIVE, "Whether or not to automatically take screenshots at the end of a round");
ConVar default_fov("default_fov", "90", FCVAR_ARCHIVE | FCVAR_BHL_ARCHIVE, "Default horizontal field of view");
ConVar cl_useslowdown("cl_useslowdown", "1", FCVAR_BHL_ARCHIVE, "Slowdown behavior on +USE. 0 - Old. 1 - New");

// Think
void CHud::Think(void)
Expand Down Expand Up @@ -101,6 +102,11 @@ void CHud::Think(void)
if (PM_GetBHopCapState() != bhopCapState)
PM_SetBHopCapState(bhopCapState);

// Update slowdown state
EUseSlowDownType useSlowDown = cl_useslowdown.GetEnumClamped<EUseSlowDownType>();
if (PM_GetUseSlowDownType() != useSlowDown)
PM_SetUseSlowDownType(useSlowDown);

// Update color code action
int colorText = clamp(hud_colortext.GetInt(), 0, 2);
m_ColorCodeAction = (ColorCodeAction)colorText;
Expand Down

0 comments on commit d92707c

Please sign in to comment.