Skip to content

Commit

Permalink
Renamed bxt_stucksave to bxt_fire_on_stuck
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyAG committed Sep 24, 2022
1 parent 1076937 commit e073b4c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions BunnymodXT/cvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ namespace CVars
CVarWrapper skill;

// Serverside CVars
CVarWrapper bxt_stucksave("bxt_stucksave", "0");
CVarWrapper bxt_stucksave_command("bxt_stucksave_command", "");
CVarWrapper bxt_fire_on_stuck("bxt_fire_on_stuck", "0");
CVarWrapper bxt_fire_on_stuck_command("bxt_fire_on_stuck_command", "");
CVarWrapper bxt_autojump("bxt_autojump", "0");
CVarWrapper bxt_autojump_priority("bxt_autojump_priority", "1");
CVarWrapper bxt_bhopcap("bxt_bhopcap", "1");
Expand Down Expand Up @@ -245,8 +245,8 @@ namespace CVars
&fps_max,
&default_fov,
&skill,
&bxt_stucksave,
&bxt_stucksave_command,
&bxt_fire_on_stuck,
&bxt_fire_on_stuck_command,
&bxt_autojump,
&bxt_bhopcap,
&bxt_timer_autostop,
Expand Down
4 changes: 2 additions & 2 deletions BunnymodXT/cvars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ namespace CVars
extern CVarWrapper skill;

// Serverside CVars
extern CVarWrapper bxt_stucksave;
extern CVarWrapper bxt_stucksave_command;
extern CVarWrapper bxt_fire_on_stuck;
extern CVarWrapper bxt_fire_on_stuck_command;
extern CVarWrapper bxt_autojump;
extern CVarWrapper bxt_autojump_priority;
extern CVarWrapper bxt_bhopcap;
Expand Down
8 changes: 4 additions & 4 deletions BunnymodXT/modules/ServerDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,8 @@ void ServerDLL::RegisterCVarsAndCommands()
REG(bxt_render_far_entities);
}
if (ORIG_PM_CheckStuck) {
REG(bxt_stucksave);
REG(bxt_stucksave_command);
REG(bxt_fire_on_stuck);
REG(bxt_fire_on_stuck_command);
}
if (ORIG_CTriggerSave__SaveTouch || ORIG_CTriggerSave__SaveTouch_Linux)
REG(bxt_disable_autosave);
Expand Down Expand Up @@ -1444,10 +1444,10 @@ void ServerDLL::LogPlayerMove(bool pre, uintptr_t pmove) const

HOOK_DEF_1(ServerDLL, void, __cdecl, PM_PlayerMove, qboolean, server)
{
if (CVars::bxt_stucksave.GetBool() && !CVars::bxt_stucksave_command.IsEmpty() && ORIG_PM_CheckStuck())
if (CVars::bxt_fire_on_stuck.GetBool() && !CVars::bxt_fire_on_stuck_command.IsEmpty() && ORIG_PM_CheckStuck())
{
std::ostringstream ss;
ss << CVars::bxt_stucksave_command.GetString().c_str() << "\n";
ss << CVars::bxt_fire_on_stuck_command.GetString().c_str() << "\n";

HwDLL::GetInstance().ORIG_Cbuf_InsertText(ss.str().c_str());
}
Expand Down

0 comments on commit e073b4c

Please # to comment.