diff --git a/src/client/component/patches.cpp b/src/client/component/patches.cpp index f5c9bb4..25f445e 100644 --- a/src/client/component/patches.cpp +++ b/src/client/component/patches.cpp @@ -331,6 +331,10 @@ namespace patches dvars::override::register_int("igs_s1", 1, 0, 1, 0); dvars::override::register_int("igs_crossgame", 1, 0, 1, 0); + // Required by UI scripts. Missing when joining a dedi and causes crashes + game::Dvar_RegisterInt("scr_gun_winlimit", 1, 0, 10, game::DVAR_FLAG_REPLICATED, "Win limit for Gun Game"); + game::Dvar_RegisterInt("scr_gun_scorelimit", 18, 1, 1000, game::DVAR_FLAG_REPLICATED, "Score limit for Gun Game"); + // Patch game chat on resolutions higher than 1080p to use the right font utils::hook::call(0x14025C825, get_chat_font_handle); utils::hook::call(0x1402BC42F, get_chat_font_handle); diff --git a/src/client/game/structs.hpp b/src/client/game/structs.hpp index 7eba9b1..2d2f9b3 100644 --- a/src/client/game/structs.hpp +++ b/src/client/game/structs.hpp @@ -1160,6 +1160,8 @@ namespace game DVAR_FLAG_LATCHED = 0x2, DVAR_FLAG_CHEAT = 0x4, DVAR_FLAG_REPLICATED = 0x8, + DVAR_FLAG_INTERNAL = 0x80, + DVAR_FLAG_EXTERNAL = 0x100, DVAR_FLAG_SERVERINFO = 0x400, DVAR_FLAG_WRITE = 0x800, DVAR_FLAG_READ = 0x2000,