diff --git a/BunnymodXT/modules/ClientDLL.cpp b/BunnymodXT/modules/ClientDLL.cpp index 9c1377bc..30833351 100644 --- a/BunnymodXT/modules/ClientDLL.cpp +++ b/BunnymodXT/modules/ClientDLL.cpp @@ -1298,15 +1298,25 @@ void ClientDLL::SetSpeedScaling(bool scaled) MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling + 19), 1, reinterpret_cast("\x75")); else if (pCS_SpeedScaling_Linux && *reinterpret_cast(pCS_SpeedScaling_Linux + 2) == 0xE9 - && *reinterpret_cast(pCS_SpeedScaling_Linux + 3) == 0x62) - MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling_Linux + 2), 4, reinterpret_cast("\x0F\x86\x61\xFE")); + && *reinterpret_cast(pCS_SpeedScaling_Linux + 3) == 0x62) { + if (*reinterpret_cast(pCS_SpeedScaling_Linux + 4) == 0xFE) + MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling_Linux + 2), 4, reinterpret_cast("\x0F\x86\x61\xFE")); + else // csczds byte + MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling_Linux + 2), 4, reinterpret_cast("\x0F\x86\x5D\xFD")); + } + } else { if (pCS_SpeedScaling && *reinterpret_cast(pCS_SpeedScaling + 19) == 0x75) MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling + 19), 1, reinterpret_cast("\xEB")); else if (pCS_SpeedScaling_Linux && *reinterpret_cast(pCS_SpeedScaling_Linux + 2) == 0x0F - && *reinterpret_cast(pCS_SpeedScaling_Linux + 3) == 0x86) - MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling_Linux + 2), 4, reinterpret_cast("\xE9\x62\xFE\xFF")); + && *reinterpret_cast(pCS_SpeedScaling_Linux + 3) == 0x86) { + if (*reinterpret_cast(pCS_SpeedScaling_Linux + 4) == 0x61) + MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling_Linux + 2), 4, reinterpret_cast("\xE9\x62\xFE\xFF")); + else + MemUtils::ReplaceBytes(reinterpret_cast(pCS_SpeedScaling_Linux + 2), 4, reinterpret_cast("\xE9\x5E\xFD\xFF")); + } + } }