From f3a2d6f40664a4bb8b870084bb209607e60d4dc6 Mon Sep 17 00:00:00 2001 From: FutureRave Date: Tue, 8 Mar 2022 14:42:41 +0000 Subject: [PATCH] Fix some things --- src/Components/Modules/Download.cpp | 8 ++++---- src/Components/Modules/Playlist.cpp | 2 +- src/Components/Modules/QuickPatch.cpp | 2 +- src/Game/Structs.hpp | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Components/Modules/Download.cpp b/src/Components/Modules/Download.cpp index a4ac5727..02b1de2a 100644 --- a/src/Components/Modules/Download.cpp +++ b/src/Components/Modules/Download.cpp @@ -918,10 +918,10 @@ namespace Components Dvar::Register("sv_wwwDownload", false, Game::dvar_flag::DVAR_ARCHIVE, "Set to true to enable downloading maps/mods from an external server."); Dvar::Register("sv_wwwBaseUrl", "", Game::dvar_flag::DVAR_ARCHIVE, "Set to the base url for the external map download."); - // Force users to enable this because we don't want to accidentally turn everyone's pc into a http server into all their files again - // not saying we are but ya know... accidents happen - // by having it saved we force the user to enable it in config_mp because it only checks the dvar on startup to see if we should init download or not - Dvar::Register("mod_force_download_server", false, Game::dvar_flag::DVAR_ARCHIVE, "Set to true to force the client to run the download server for mods (for mods in private matches)."); + // Force users to enable this because we don't want to accidentally turn everyone's pc into a http server into all their files again + // not saying we are but ya know... accidents happen + // by having it saved we force the user to enable it in config_mp because it only checks the dvar on startup to see if we should init download or not + Dvar::Register("mod_force_download_server", false, Game::dvar_flag::DVAR_ARCHIVE, "Set to true to force the client to run the download server for mods (for mods in private matches)."); }); Scheduler::OnFrame([]() diff --git a/src/Components/Modules/Playlist.cpp b/src/Components/Modules/Playlist.cpp index e413d534..09cb8776 100644 --- a/src/Components/Modules/Playlist.cpp +++ b/src/Components/Modules/Playlist.cpp @@ -21,7 +21,7 @@ namespace Components Dvar::Var("xblive_privateserver").set(false); - std::string playlistFilename = Dvar::Var("playlistFilename").get(); + auto playlistFilename = Dvar::Var("playlistFilename").get(); FileSystem::File playlist(playlistFilename); if (playlist.exists()) diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 395ff0ff..cf1f517e 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -374,7 +374,7 @@ namespace Components Utils::Hook(0x4F66A3, CL_KeyEvent_ConsoleEscape_Stub, HOOK_JUMP).install()->quick(); // Intermission time dvar - Game::Dvar_RegisterFloat("scr_intermissionTime", 10, 0, 120, Game::dvar_flag::DVAR_EXTERNAL, "Time in seconds before match server loads the next map"); + Game::Dvar_RegisterFloat("scr_intermissionTime", 10, 0, 120, Game::dvar_flag::DVAR_NONE, "Time in seconds before match server loads the next map"); g_antilag = Game::Dvar_RegisterBool("g_antilag", true, Game::DVAR_CODINFO, "Perform antilag"); Utils::Hook(0x5D6D56, QuickPatch::ClientEventsFireWeaponStub, HOOK_JUMP).install()->quick(); diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 25c23fc0..0b691df5 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -85,12 +85,12 @@ namespace Game DVAR_SCRIPTINFO = 0x10, DVAR_UNKNOWN20 = 0x20, DVAR_CHANGEABLE_RESET = 0x40, - DVAR_ROM = 0x80, // Display only, cannot be set by user at all + DVAR_UNKNOWN80 = 0x80, DVAR_EXTERNAL = 0x100, // Created by a set command DVAR_USERINFO = 0x200, // Sent to server on connect or change DVAR_SERVERINFO = 0x400, // Sent in response to front end requests DVAR_WRITEPROTECTED = 0x800, - DVAR_SYSTEMINFO = 0x1000, // These dvars will be duplicated on all clients + DVAR_SYSTEMINFO = 0x1000, // Will be duplicated on all clients DVAR_READONLY = 0x2000, // Read only (same as DVAR_WRITEPROTECTED?) DVAR_SAVED = 0x4000, DVAR_AUTOEXEC = 0x8000, @@ -3361,7 +3361,7 @@ namespace Game { const char* name; const char* description; - unsigned __int16 flags; + unsigned int flags; dvar_type type; bool modified; DvarValue current;