diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index 2a2ef1f2..741385fc 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -54,6 +54,8 @@ namespace Components 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"); // Process command line? diff --git a/src/Components/Modules/Network.cpp b/src/Components/Modules/Network.cpp index 45cd5aec..d60bb46c 100644 --- a/src/Components/Modules/Network.cpp +++ b/src/Components/Modules/Network.cpp @@ -348,6 +348,13 @@ namespace Components // increase cl_maxpackets limit Utils::Hook::Set(0x4050A1, 125); + // increase snaps + //Utils::Hook::Set(0x405357, 40); + + // default maxpackets and snaps + Utils::Hook::Set(0x40535B, 30); + Utils::Hook::Set(0x4050A5, 125); + // Parse port as short in Net_AddrToString Utils::Hook::Set(0x4698E3, "%u.%u.%u.%u:%hu"); diff --git a/src/Components/Modules/Slowmotion.cpp b/src/Components/Modules/Slowmotion.cpp index 3df30502..41b592db 100644 --- a/src/Components/Modules/Slowmotion.cpp +++ b/src/Components/Modules/Slowmotion.cpp @@ -74,13 +74,21 @@ namespace Components } } - SlowMotion::SlowMotion() + void SlowMotion::DrawConnectionInterruptedStub(int a1) { - if (Dedicated::IsEnabled()) + if (!*reinterpret_cast(0x1AD8ED0) && !*reinterpret_cast(0x1AD8EEC) && !*reinterpret_cast(0x1AD78F8)) { - SlowMotion::Delay = 0; - Utils::Hook(0x5F5FF2, SlowMotion::SetSlowMotion, HOOK_JUMP).install()->quick(); - Utils::Hook(0x60B38A, SlowMotion::ApplySlowMotionStub, HOOK_CALL).install()->quick(); + Utils::Hook::Call(0x454A70)(a1); } } + + SlowMotion::SlowMotion() + { + SlowMotion::Delay = 0; + Utils::Hook(0x5F5FF2, SlowMotion::SetSlowMotion, HOOK_JUMP).install()->quick(); + Utils::Hook(0x60B38A, SlowMotion::ApplySlowMotionStub, HOOK_CALL).install()->quick(); + + Utils::Hook(0x4A54ED, SlowMotion::DrawConnectionInterruptedStub, HOOK_CALL).install()->quick(); + Utils::Hook(0x4A54FB, SlowMotion::DrawConnectionInterruptedStub, HOOK_CALL).install()->quick(); + } } diff --git a/src/Components/Modules/Slowmotion.hpp b/src/Components/Modules/Slowmotion.hpp index 7f9dcee4..9e90b090 100644 --- a/src/Components/Modules/Slowmotion.hpp +++ b/src/Components/Modules/Slowmotion.hpp @@ -16,5 +16,7 @@ namespace Components static void SetSlowMotion(); static void ApplySlowMotion(int timePassed); static void ApplySlowMotionStub(); + + static void DrawConnectionInterruptedStub(int a1); }; }