From ea856189fe428f66f3c093e22a3b776e0e94fe89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 09:27:28 +0000 Subject: [PATCH 1/8] build(deps): bump deps/zlib from `79a0e44` to `643e17b` Bumps [deps/zlib](https://github.com/madler/zlib) from `79a0e44` to `643e17b`. - [Release notes](https://github.com/madler/zlib/releases) - [Commits](https://github.com/madler/zlib/compare/79a0e447a0dfa32979420cb21cfb96d684b2c9d5...643e17b7498d12ab8d15565662880579692f769d) --- updated-dependencies: - dependency-name: deps/zlib dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/zlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/zlib b/deps/zlib index 79a0e447..643e17b7 160000 --- a/deps/zlib +++ b/deps/zlib @@ -1 +1 @@ -Subproject commit 79a0e447a0dfa32979420cb21cfb96d684b2c9d5 +Subproject commit 643e17b7498d12ab8d15565662880579692f769d From 244bc7a658d4708652a8864bd23ec23fd6261f71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 09:41:30 +0000 Subject: [PATCH 2/8] build(deps): bump deps/rapidjson from `476ffa2` to `6089180` Bumps [deps/rapidjson](https://github.com/Tencent/rapidjson) from `476ffa2` to `6089180`. - [Release notes](https://github.com/Tencent/rapidjson/releases) - [Commits](https://github.com/Tencent/rapidjson/compare/476ffa2fd272243275a74c36952f210267dc3088...6089180ecb704cb2b136777798fa1be303618975) --- updated-dependencies: - dependency-name: deps/rapidjson dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/rapidjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/rapidjson b/deps/rapidjson index 476ffa2f..6089180e 160000 --- a/deps/rapidjson +++ b/deps/rapidjson @@ -1 +1 @@ -Subproject commit 476ffa2fd272243275a74c36952f210267dc3088 +Subproject commit 6089180ecb704cb2b136777798fa1be303618975 From d6b540efef0029f528036471803968a5db777bf9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:52:52 +0000 Subject: [PATCH 3/8] Bump deps/libtommath from `8314bde` to `5809141` Bumps [deps/libtommath](https://github.com/libtom/libtommath) from `8314bde` to `5809141`. - [Release notes](https://github.com/libtom/libtommath/releases) - [Commits](https://github.com/libtom/libtommath/compare/8314bde5e5c8e5d9331460130a9d1066e324f091...5809141a3a6ec1bf3443c927c02b955e19224016) --- updated-dependencies: - dependency-name: deps/libtommath dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/libtommath | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/libtommath b/deps/libtommath index 8314bde5..5809141a 160000 --- a/deps/libtommath +++ b/deps/libtommath @@ -1 +1 @@ -Subproject commit 8314bde5e5c8e5d9331460130a9d1066e324f091 +Subproject commit 5809141a3a6ec1bf3443c927c02b955e19224016 From 8b0c3cd70790406cc9b43e4907c77397eec81be3 Mon Sep 17 00:00:00 2001 From: Roxanne Date: Wed, 19 Jun 2024 14:04:10 +0200 Subject: [PATCH 4/8] Default sv_network_fps is default --- src/Components/Modules/Dvar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Dvar.cpp b/src/Components/Modules/Dvar.cpp index 74d883d0..ea041d37 100644 --- a/src/Components/Modules/Dvar.cpp +++ b/src/Components/Modules/Dvar.cpp @@ -248,9 +248,10 @@ namespace Components return Name.get(); } - const Game::dvar_t* Dvar::Dvar_RegisterSVNetworkFps(const char* dvarName, int /*value*/, int min, int /*max*/, std::uint16_t /*flags*/, const char* description) + const Game::dvar_t* Dvar::Dvar_RegisterSVNetworkFps(const char* dvarName, int value, int min, int /*max*/, std::uint16_t /*flags*/, const char* description) { - return Game::Dvar_RegisterInt(dvarName, 1000, min, 1000, Game::DVAR_NONE, description); + // bump limit up to 1000 + return Game::Dvar_RegisterInt(dvarName, value, min, 1000, Game::DVAR_NONE, description); } const Game::dvar_t* Dvar::Dvar_RegisterPerkExtendedMeleeRange(const char* dvarName, float value, float min, float /*max*/, std::uint16_t flags, const char* description) From 932e9b2560760dfb299d532b47c22beb6e9ab74a Mon Sep 17 00:00:00 2001 From: louve Date: Sat, 22 Jun 2024 20:19:59 +0200 Subject: [PATCH 5/8] Prevent bug when refreshing arenas too early --- src/Components/Modules/Maps.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index e4e6c2c0..e85a20e1 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -320,6 +320,12 @@ namespace Components void Maps::ForceRefreshArenas() { + if (!FastFiles::Ready()) + { + Logger::Print("Not refreshing arenas (fastfiles are not ready yet)\n"); + return; + } + if (Game::Sys_IsMainThread()) { if (*Game::g_quitRequested) From cb3e24488517c4e820b8ae48698fc821767de5f5 Mon Sep 17 00:00:00 2001 From: louve Date: Sat, 22 Jun 2024 20:21:07 +0200 Subject: [PATCH 6/8] Bump protocol & hotfix sv_network_fps --- src/Components/Modules/Dedicated.cpp | 1 - src/Components/Modules/Dvar.cpp | 2 +- src/Game/Structs.hpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index a5748d8a..5a82ea4a 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -70,7 +70,6 @@ namespace Components Command::Execute("xblive_privateserver 0"); Command::Execute("xstartprivatematch"); //Command::Execute("xstartlobby"); - Command::Execute("sv_network_fps 1000"); Command::Execute("cl_maxpackets 125"); Command::Execute("snaps 30"); Command::Execute("com_maxfps 125"); diff --git a/src/Components/Modules/Dvar.cpp b/src/Components/Modules/Dvar.cpp index ea041d37..d20d8540 100644 --- a/src/Components/Modules/Dvar.cpp +++ b/src/Components/Modules/Dvar.cpp @@ -251,7 +251,7 @@ namespace Components const Game::dvar_t* Dvar::Dvar_RegisterSVNetworkFps(const char* dvarName, int value, int min, int /*max*/, std::uint16_t /*flags*/, const char* description) { // bump limit up to 1000 - return Game::Dvar_RegisterInt(dvarName, value, min, 1000, Game::DVAR_NONE, description); + return Game::Dvar_RegisterInt(dvarName, Dedicated::IsEnabled() ? 1000 : value, min, 1000, Game::DVAR_NONE, description); } const Game::dvar_t* Dvar::Dvar_RegisterPerkExtendedMeleeRange(const char* dvarName, float value, float min, float /*max*/, std::uint16_t flags, const char* description) diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 257044a1..0d9aac9e 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -1,6 +1,6 @@ #pragma once -#define PROTOCOL 0x97 +#define PROTOCOL 0x98 #define NUM_CUSTOM_CLASSES 15 #define FX_ELEM_FIELD_COUNT 90 From 5fb51f4ab2fcacd0c4347504e67ebda0087ca9ca Mon Sep 17 00:00:00 2001 From: louve Date: Thu, 4 Jul 2024 19:40:56 +0200 Subject: [PATCH 7/8] Cheat away custom movement variables --- src/Components/Modules/PlayerMovement.cpp | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Components/Modules/PlayerMovement.cpp b/src/Components/Modules/PlayerMovement.cpp index 8e39f60d..023fc7a0 100644 --- a/src/Components/Modules/PlayerMovement.cpp +++ b/src/Components/Modules/PlayerMovement.cpp @@ -304,46 +304,46 @@ namespace Components void PlayerMovement::RegisterMovementDvars() { PlayerDuckedSpeedScale = Game::Dvar_RegisterFloat("player_duckedSpeedScale", - 0.65f, 0.0f, 5.0f, Game::DVAR_CODINFO, + 0.65f, 0.0f, 5.0f, Game::DVAR_CHEAT, "The scale applied to the player speed when ducking"); PlayerProneSpeedScale = Game::Dvar_RegisterFloat("player_proneSpeedScale", - 0.15f, 0.0f, 5.0f, Game::DVAR_CODINFO, + 0.15f, 0.0f, 5.0f, Game::DVAR_CHEAT, "The scale applied to the player speed when crawling"); // 3arc naming convention CGUfoScaler = Game::Dvar_RegisterFloat("cg_ufo_scaler", - 6.0f, 0.001f, 1000.0f, Game::DVAR_CODINFO, + 6.0f, 0.001f, 1000.0f, Game::DVAR_CHEAT, "The speed at which ufo camera moves"); CGNoclipScaler = Game::Dvar_RegisterFloat("cg_noclip_scaler", - 3.0f, 0.001f, 1000.0f, Game::DVAR_CODINFO, + 3.0f, 0.001f, 1000.0f, Game::DVAR_CHEAT, "The speed at which noclip camera moves"); BGDisableLandingSlowdown = Game::Dvar_RegisterBool("bg_disableLandingSlowdown", - false, Game::DVAR_CODINFO, "Toggle landing slowdown"); + false, Game::DVAR_CHEAT, "Toggle landing slowdown"); BGBunnyHopAuto = Game::Dvar_RegisterBool("bg_bunnyHopAuto", - false, Game::DVAR_CODINFO, "Constantly jump when holding space"); + false, Game::DVAR_CHEAT, "Constantly jump when holding space"); BGRocketJump = Game::Dvar_RegisterBool("bg_rocketJump", - false, Game::DVAR_CODINFO, "Enable CoD4 rocket jumps"); + false, Game::DVAR_CHEAT, "Enable CoD4 rocket jumps"); BGRocketJumpScale = Game::Dvar_RegisterFloat("bg_rocketJumpScale", - 64.0f, 1.0f, std::numeric_limits::max(), Game::DVAR_CODINFO, + 64.0f, 1.0f, std::numeric_limits::max(), Game::DVAR_CHEAT, "The scale applied to the pushback force of a rocket"); BGPlayerEjection = Game::Dvar_RegisterBool("bg_playerEjection", - true, Game::DVAR_CODINFO, "Push intersecting players away from each other"); + true, Game::DVAR_CHEAT, "Push intersecting players away from each other"); BGPlayerCollision = Game::Dvar_RegisterBool("bg_playerCollision", - true, Game::DVAR_CODINFO, "Push intersecting players away from each other"); + true, Game::DVAR_CHEAT, "Push intersecting players away from each other"); BGClimbAnything = Game::Dvar_RegisterBool("bg_climbAnything", - false, Game::DVAR_CODINFO, "Treat any surface as a ladder"); + false, Game::DVAR_CHEAT, "Treat any surface as a ladder"); BGRecoilMultiplier = Game::Dvar_RegisterFloat("bg_recoilMultiplier", - 1.0f, 0.0f, 1000.0f, Game::DVAR_CODINFO, + 1.0f, 0.0f, 1000.0f, Game::DVAR_CHEAT, "The scale applied to the player recoil when firing"); } From a6a825cf53451b96603aab3670ea4fa323e4b78c Mon Sep 17 00:00:00 2001 From: louve Date: Thu, 4 Jul 2024 20:06:38 +0200 Subject: [PATCH 8/8] Killed partymigrate handler --- src/Components/Modules/Party.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Components/Modules/Party.cpp b/src/Components/Modules/Party.cpp index a52c915f..413fc90a 100644 --- a/src/Components/Modules/Party.cpp +++ b/src/Components/Modules/Party.cpp @@ -191,6 +191,15 @@ namespace Components return PartyEnable.get(); } + __declspec(naked) void PartyMigrate_HandlePacket() + { + __asm + { + mov eax, 0; + retn; + } + } + Party::Party() { if (ZoneBuilder::IsEnabled()) @@ -201,6 +210,9 @@ namespace Components PartyEnable = Dvar::Register("party_enable", Dedicated::IsEnabled(), Game::DVAR_NONE, "Enable party system"); Dvar::Register("xblive_privatematch", true, Game::DVAR_INIT, ""); + // Kill the party migrate handler - it's not necessary and has apparently been used in the past for trickery? + Utils::Hook(0x46AB70, PartyMigrate_HandlePacket, HOOK_JUMP).install()->quick(); + // various changes to SV_DirectConnect-y stuff to allow non-party joinees Utils::Hook::Set(0x460D96, 0x90E9); Utils::Hook::Set(0x460F0A, 0xEB);