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 74d883d0..d20d8540 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, 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/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) 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); 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"); } 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