diff --git a/src/client/component/dvars_patches.cpp b/src/client/component/dvars_patches.cpp index a91a0117..e45f793a 100644 --- a/src/client/component/dvars_patches.cpp +++ b/src/client/component/dvars_patches.cpp @@ -13,7 +13,7 @@ namespace dvars_patches { void patch_dvars() { - game::register_sessionmode_dvar_bool("com_pauseSupported", !game::is_server(), game::DVAR_SERVERINFO, "Whether is pause is ever supported by the game mode", game::MODE_ZOMBIES); + game::register_sessionmode_dvar_bool("com_pauseSupported", !game::is_server(), game::DVAR_SERVERINFO, "Whether is pause is ever supported by the game mode"); } void patch_flags() diff --git a/src/client/game/utils.cpp b/src/client/game/utils.cpp index 18918a3f..69c8a9a6 100644 --- a/src/client/game/utils.cpp +++ b/src/client/game/utils.cpp @@ -46,7 +46,18 @@ namespace game if (registered_dvar) { registered_dvar->debugName = dvar_name; - game::Dvar_SessionModeSetDefaultBool(hash, value, mode); + + if (mode == MODE_COUNT) + { + for (int i = MODE_FIRST; i < MODE_COUNT; ++i) + { + game::Dvar_SessionModeSetDefaultBool(hash, value, static_cast(i)); + } + } + else + { + game::Dvar_SessionModeSetDefaultBool(hash, value, mode); + } } return registered_dvar; diff --git a/src/client/game/utils.hpp b/src/client/game/utils.hpp index 41f87e20..07ffc164 100644 --- a/src/client/game/utils.hpp +++ b/src/client/game/utils.hpp @@ -9,7 +9,7 @@ namespace game bool get_dvar_bool(const char* dvar_name); dvar_t* register_dvar_bool(const char* dvar_name, bool value, dvarFlags_e flags, const char* description); - dvar_t* register_sessionmode_dvar_bool(const char* dvar_name, const bool value, const dvarFlags_e flags, const char* description, const eModes mode); + dvar_t* register_sessionmode_dvar_bool(const char* dvar_name, const bool value, const dvarFlags_e flags, const char* description, const eModes mode = MODE_COUNT); void dvar_add_flags(const char* dvar, dvarFlags_e flags); void dvar_set_flags(const char* dvar_name, dvarFlags_e flags); }