From 4e54f95c018cce69a28e9e78fdb06a9821e9b991 Mon Sep 17 00:00:00 2001 From: joelrau <71751328+j0elr4u@users.noreply.github.com> Date: Tue, 16 Feb 2021 18:48:45 +0200 Subject: [PATCH] Minor fixes --- src/client/component/branding.cpp | 2 +- src/client/component/demonware.cpp | 4 +++- src/client/component/patches.cpp | 1 - src/client/component/videos.cpp | 10 +++++----- src/client/game/demonware/service.hpp | 6 ++++-- src/client/game/demonware/services/bdStorage.cpp | 4 ++-- src/client/game/game.hpp | 2 +- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/client/component/branding.cpp b/src/client/component/branding.cpp index 9d12f36..0db9944 100644 --- a/src/client/component/branding.cpp +++ b/src/client/component/branding.cpp @@ -38,7 +38,7 @@ namespace branding if (game::environment::is_mp()) { - localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "S1-MOD: MULTIPLAYER\n"); + localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "S1x: MULTIPLAYER\n"); } localized_strings::override("LUA_MENU_LEGAL_COPYRIGHT", "S1x: " VERSION); diff --git a/src/client/component/demonware.cpp b/src/client/component/demonware.cpp index ad0075a..36bbccc 100644 --- a/src/client/component/demonware.cpp +++ b/src/client/component/demonware.cpp @@ -20,7 +20,7 @@ namespace demonware void bd_logger_stub(const char* const function, const char* const msg, ...) { static auto* enabled = - game::Dvar_RegisterBool("bd_logger_enabled", false, game::DVAR_FLAG_NONE, "bdLogger"); + game::Dvar_RegisterBool("bd_logger_enabled", false, game::DVAR_FLAG_SAVED, "bdLogger"); if (!enabled->current.enabled) { return; @@ -393,6 +393,8 @@ namespace demonware utils::hook::set(0x140698BB2, 0x0); // CURLOPT_SSL_VERIFYPEER utils::hook::set(0x140698B69, 0xAF); // CURLOPT_SSL_VERIFYHOST utils::hook::set(0x14088D0E8, 0x0); // HTTPS -> HTTP + + utils::hook::set(0x140437CC0, 0xC3); // SV_SendMatchData } void pre_destroy() override diff --git a/src/client/component/patches.cpp b/src/client/component/patches.cpp index ca0de12..a2f5765 100644 --- a/src/client/component/patches.cpp +++ b/src/client/component/patches.cpp @@ -136,7 +136,6 @@ namespace patches if (file.exists()) { snprintf(buf, size, "%s\n", file.get_buffer().data()); - printf("%s\n", buf); return buf; } diff --git a/src/client/component/videos.cpp b/src/client/component/videos.cpp index 3e72bbb..c43a894 100644 --- a/src/client/component/videos.cpp +++ b/src/client/component/videos.cpp @@ -72,14 +72,14 @@ namespace videos if (game::environment::is_mp()) { - replace("menus_bg_comp2", "menus_bg_s1-mod"); - replace("mp_menus_bg_options", "menus_bg_s1-mod_blur"); + replace("menus_bg_comp2", "menus_bg_s1x"); + replace("mp_menus_bg_options", "menus_bg_s1x_blur"); } else if (game::environment::is_sp()) { - replace("sp_menus_bg_main_menu", "menus_bg_s1-mod_sp"); - replace("sp_menus_bg_campaign", "menus_bg_s1-mod_sp"); - replace("sp_menus_bg_options", "menus_bg_s1-mod_sp"); + replace("sp_menus_bg_main_menu", "menus_bg_s1x_sp"); + replace("sp_menus_bg_campaign", "menus_bg_s1x_sp"); + replace("sp_menus_bg_options", "menus_bg_s1x_sp"); } } }; diff --git a/src/client/game/demonware/service.hpp b/src/client/game/demonware/service.hpp index 574ae36..4f445a4 100644 --- a/src/client/game/demonware/service.hpp +++ b/src/client/game/demonware/service.hpp @@ -37,13 +37,15 @@ public: if (it != this->tasks_.end()) { - std::cout << "demonware::" << name_ << ": executing task '" << utils::string::va("%d", this->task_id_) << "'\n"; +#ifdef DEBUG + printf("demonware::%s: executing task '%d'\n", name_.data(), this->task_id_); +#endif it->second(server, &buffer); } else { - std::cout << "demonware::" << name_ << ": missing task '" << utils::string::va("%d", this->task_id_) << "'\n"; + printf("demonware::%s: missing task '%d'\n", name_.data(), this->task_id_); // return no error server->create_reply(this->task_id_)->send(); diff --git a/src/client/game/demonware/services/bdStorage.cpp b/src/client/game/demonware/services/bdStorage.cpp index 2b8451b..1b7f881 100644 --- a/src/client/game/demonware/services/bdStorage.cpp +++ b/src/client/game/demonware/services/bdStorage.cpp @@ -15,11 +15,11 @@ namespace demonware this->register_task(13, &bdStorage::unk13); this->map_publisher_resource("motd-.*\\.txt", DW_MOTD); - this->map_publisher_resource("ffotd-*\\.ff", DW_FASTFILE); + //this->map_publisher_resource("ffotd-.*\\.ff", DW_FASTFILE); this->map_publisher_resource("playlists(_.+)?\\.aggr", DW_PLAYLISTS); this->map_publisher_resource("social_[Tt][Uu][0-9]+\\.cfg", DW_SOCIAL_CONFIG); this->map_publisher_resource("mm\\.cfg", DW_MM_CONFIG); - this->map_publisher_resource("entitlement_config_[Tt][Uu][0-9]+\\.info", DW_ENTITLEMENT_CONFIG); + this->map_publisher_resource("entitlement_config\\.info", DW_ENTITLEMENT_CONFIG); this->map_publisher_resource("codPointStoreConfig_[Tt][Uu][0-9]+\\.csv", DW_CODPOINTS_CONFIG); this->map_publisher_resource("lootConfig_[Tt][Uu][0-9]+\\.csv", DW_LOOT_CONFIG); this->map_publisher_resource("winStoreConfig_[Tt][Uu][0-9]+\\.csv", DW_STORE_CONFIG); diff --git a/src/client/game/game.hpp b/src/client/game/game.hpp index 85947f7..bdbe718 100644 --- a/src/client/game/game.hpp +++ b/src/client/game/game.hpp @@ -5,7 +5,7 @@ #define SELECT_VALUE(sp, mp) (game::environment::is_sp() ? (sp) : (mp)) -#define SERVER_CD_KEY "S1MOD-CD-Key" +#define SERVER_CD_KEY "S1X-CD-Key" namespace game {