From 914180f9add22bfed36e77eea2ed8d9a301658f9 Mon Sep 17 00:00:00 2001 From: Seter <86374920+skkuull@users.noreply.github.com> Date: Sun, 15 Jan 2023 02:04:32 +0300 Subject: [PATCH 1/5] make tags patch for debug only --- src/client/component/weapon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/component/weapon.cpp b/src/client/component/weapon.cpp index ad88234b..e7e2342f 100644 --- a/src/client/component/weapon.cpp +++ b/src/client/component/weapon.cpp @@ -128,9 +128,10 @@ namespace weapon // precache all weapons that are loaded in zones g_setup_level_weapon_def_hook.create(0x462630_b, g_setup_level_weapon_def_stub); +#ifdef DEBUG // use tag_weapon if tag_weapon_right or tag_knife_attach are not found on model xmodel_get_bone_index_hook.create(0x5C82B0_b, xmodel_get_bone_index_stub); - +#endif // make custom weapon index mismatch not drop in CG_SetupCustomWeapon utils::hook::call(0x11B9AF_b, cw_mismatch_error_stub); From 9f1d2379f8e1e71e3e8edbc2808e2b9948786059 Mon Sep 17 00:00:00 2001 From: m Date: Thu, 26 Jan 2023 23:47:42 -0600 Subject: [PATCH 2/5] fix slow motion killcams --- src/client/component/slowmotion.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/client/component/slowmotion.cpp b/src/client/component/slowmotion.cpp index e70911fb..86dfb7ee 100644 --- a/src/client/component/slowmotion.cpp +++ b/src/client/component/slowmotion.cpp @@ -10,6 +10,20 @@ namespace slowmotion { + namespace + { + template + T get_timescale_safe(const scripting::value_wrap& arg) + { + if (arg.is()) + { + return arg.as(); + } + + return static_cast(arg.as()); + } + } + class component final : public component_interface { public: @@ -28,8 +42,8 @@ namespace slowmotion } const auto start = args[0].as(); - const auto end = (args.size() > 0 ? args[1].as() : 1.0f); - const auto duration = (args.size() > 1 ? args[2].as() : 1) * 1000; + const auto end = (args.size() > 0 ? get_timescale_safe(args[1]) : 1.0f); + const auto duration = (args.size() > 1 ? get_timescale_safe(args[2]) : 1) * 1000; game::SV_SetConfigstring(10, utils::string::va("%i %i %g %g", *game::mp::gameTime, duration, start, end)); game::Com_SetSlowMotion(start, end, duration); From f620354be4bb9ff30d7baecb14d25b90b5760bc9 Mon Sep 17 00:00:00 2001 From: m Date: Fri, 27 Jan 2023 00:00:18 -0600 Subject: [PATCH 3/5] don't use h2 title font keeping the font around for later usage though --- data/cdata/ui_scripts/patches/language.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/cdata/ui_scripts/patches/language.lua b/data/cdata/ui_scripts/patches/language.lua index 2a62d98d..1d322afa 100644 --- a/data/cdata/ui_scripts/patches/language.lua +++ b/data/cdata/ui_scripts/patches/language.lua @@ -103,3 +103,21 @@ if not Engine.InFrontend() then return res end end + +--[[ +-- H2 title font +if game:issingleplayer() or + (user_language == "simplified_chinese" or user_language == "traditional_chinese" or user_language == + "japanese_partial" or user_language == "korean") then + return +end + +local scale = function(size) + return size * 720 / 1080 +end + +CoD.TextSettings.H1TitleFont = { + Font = RegisterFont("fonts/bank_h1.ttf", 50), + Height = scale(50) +} +]]-- From 962ca7be7b80cb2f00a4971ac084e721101e04f8 Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Thu, 8 Jun 2023 04:11:40 +0200 Subject: [PATCH 4/5] Update master ip --- src/client/component/server_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/component/server_list.cpp b/src/client/component/server_list.cpp index 355dd65d..7dc1bde8 100644 --- a/src/client/component/server_list.cpp +++ b/src/client/component/server_list.cpp @@ -411,7 +411,7 @@ namespace server_list scheduler::once([]() { // add dvars to change destination master server ip/port - master_server_ip = dvars::register_string("masterServerIP", "master.h1.gg", game::DVAR_FLAG_NONE, + master_server_ip = dvars::register_string("masterServerIP", "h1.fed0001.xyz", game::DVAR_FLAG_NONE, "IP of the destination master server to connect to"); master_server_port = dvars::register_string("masterServerPort", "20810", game::DVAR_FLAG_NONE, "Port of the destination master server to connect to"); From 2e83156e461025b9f8df0125434f55e21b5c0190 Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Sun, 24 Dec 2023 01:50:25 +0100 Subject: [PATCH 5/5] Small fix --- src/client/component/party.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index 0ccf100b..f6b451b6 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -1144,11 +1144,6 @@ namespace party return; } - if (download_files(target, info, false)) - { - return; - } - server_connection_state.motd = info.get("sv_motd"); server_connection_state.max_clients = std::stoi(info.get("sv_maxclients")); server_connection_state.base_url = info.get("sv_wwwBaseUrl"); @@ -1161,6 +1156,11 @@ namespace party server_discord_info.emplace(discord_info); } + if (download_files(target, info, false)) + { + return; + } + connect_to_party(target, mapname, gametype); }); }