Skip to content

Commit

Permalink
Added bxt_force_clear (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyAG committed Jun 16, 2022
1 parent 985eb4d commit 56ca7f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions BunnymodXT/cvars.cpp
Expand Up @@ -35,6 +35,7 @@ namespace CVars
CVarWrapper bxt_viewmodel_semitransparent("bxt_viewmodel_semitransparent", "0");
CVarWrapper bxt_clear_green("bxt_clear_green", "0");
CVarWrapper bxt_force_fov("bxt_force_fov", "0");
CVarWrapper bxt_force_clear("bxt_force_clear", "0");
CVarWrapper bxt_fix_mouse_horizontal_limit("bxt_fix_mouse_horizontal_limit", "0");
CVarWrapper bxt_hud_game_color("bxt_hud_game_color", "");

Expand Down Expand Up @@ -203,6 +204,7 @@ namespace CVars
&bxt_viewmodel_semitransparent,
&bxt_clear_green,
&bxt_force_fov,
&bxt_force_clear,
&bxt_fix_mouse_horizontal_limit,
&bxt_hud_game_color,
&bxt_autojump_priority,
Expand Down
1 change: 1 addition & 0 deletions BunnymodXT/cvars.hpp
Expand Up @@ -148,6 +148,7 @@ namespace CVars
extern CVarWrapper bxt_viewmodel_semitransparent;
extern CVarWrapper bxt_clear_green;
extern CVarWrapper bxt_force_fov;
extern CVarWrapper bxt_force_clear;
extern CVarWrapper bxt_fix_mouse_horizontal_limit;
extern CVarWrapper bxt_hud_game_color;

Expand Down
3 changes: 2 additions & 1 deletion BunnymodXT/modules/HwDLL.cpp
Expand Up @@ -3702,6 +3702,7 @@ void HwDLL::RegisterCVarsAndCommandsIfNeeded()
RegisterCVar(CVars::bxt_viewmodel_semitransparent);
RegisterCVar(CVars::bxt_clear_green);
RegisterCVar(CVars::bxt_fix_mouse_horizontal_limit);
RegisterCVar(CVars::bxt_force_clear);

if (ORIG_R_SetFrustum && scr_fov_value)
RegisterCVar(CVars::bxt_force_fov);
Expand Down Expand Up @@ -5539,7 +5540,7 @@ HOOK_DEF_0(HwDLL, void, __cdecl, R_Clear)
{
// This is needed or everything will look washed out or with unintended
// motion blur.
if (CVars::bxt_water_remove.GetBool() || (CVars::sv_cheats.GetBool() && (CVars::bxt_wallhack.GetBool() || CVars::bxt_skybox_remove.GetBool() || CVars::bxt_show_only_viewmodel.GetBool()))) {
if (CVars::bxt_water_remove.GetBool() || CVars::bxt_force_clear.GetBool() || (CVars::sv_cheats.GetBool() && (CVars::bxt_wallhack.GetBool() || CVars::bxt_skybox_remove.GetBool() || CVars::bxt_show_only_viewmodel.GetBool()))) {
if (CVars::bxt_clear_green.GetBool())
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
else
Expand Down

0 comments on commit 56ca7f6

Please sign in to comment.