diff --git a/include/reclasses/C_BasePlayer.hpp b/include/reclasses/C_BasePlayer.hpp index 0802a6eb..ae1e0af4 100644 --- a/include/reclasses/C_BasePlayer.hpp +++ b/include/reclasses/C_BasePlayer.hpp @@ -29,7 +29,7 @@ public: } inline static IClientEntity *GetEquippedDemoShield(IClientEntity *self) { - static auto signature = gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC 2C 8B 45 ? 8B 98 ? ? ? ? 85 DB 7E"); + static auto signature = e8call_direct(gSignatures.GetClientSignature("E8 ? ? ? ? 8B 55 ? 85 C0 0F 84 ? ? ? ? 89 5C 24")); typedef IClientEntity *(*GetEquippedDemoShield_t)(IClientEntity *); static GetEquippedDemoShield_t GetEquippedDemoShield_fn = GetEquippedDemoShield_t(signature); return GetEquippedDemoShield_fn(self); diff --git a/src/hacks/MiscAimbot.cpp b/src/hacks/MiscAimbot.cpp index 1378df6b..b134d39c 100644 --- a/src/hacks/MiscAimbot.cpp +++ b/src/hacks/MiscAimbot.cpp @@ -62,7 +62,7 @@ std::pair FindBestEnt(bool teammate, bool Predict, bool continue; float scr = ent->m_flDistance(); std::optional data = std::nullopt; - if (!shouldBacktrack && demoknight_mode) + if (shouldBacktrack && demoknight_mode) { auto good_ticks = backtrack::getGoodTicks(ent); if (good_ticks) @@ -144,7 +144,7 @@ std::pair FindBestEnt(bool teammate, bool Predict, bool float scr = ent->m_flDistance(); std::optional data = std::nullopt; - if (!shouldBacktrack && demoknight_mode) + if (shouldBacktrack && demoknight_mode) { auto good_ticks = backtrack::getGoodTicks(ent); if (good_ticks) @@ -649,14 +649,16 @@ float CAM_CapYaw_Hook(IInput *this_, float fVal) } #define foffset(p, i) ((unsigned char *) &p)[i] -static InitRoutine init([]() { - EC::Register(EC::CreateMove, CreateMove, "cm_miscaimbot", EC::average); - EC::Register(EC::CreateMoveWarp, CreateMove, "cmw_miscaimbot", EC::average); +static InitRoutine init( + []() + { + EC::Register(EC::CreateMove, CreateMove, "cm_miscaimbot", EC::average); + EC::Register(EC::CreateMoveWarp, CreateMove, "cmw_miscaimbot", EC::average); - static auto signature = gSignatures.GetClientSignature("55 89 E5 53 83 EC 14 E8 ? ? ? ? 85 C0 74 ? 8D 98 ? ? ? ? C7 44 24 ? 11 00 00 00"); + static auto signature = gSignatures.GetClientSignature("55 89 E5 53 83 EC 14 E8 ? ? ? ? 85 C0 74 ? 8D 98 ? ? ? ? C7 44 24 ? 11 00 00 00"); - CAM_CapYaw_detour.Init(signature, (void *) CAM_CapYaw_Hook); - EC::Register( - EC::Shutdown, []() { CAM_CapYaw_detour.Shutdown(); }, "chargeaim_shutdown"); -}); + CAM_CapYaw_detour.Init(signature, (void *) CAM_CapYaw_Hook); + EC::Register( + EC::Shutdown, []() { CAM_CapYaw_detour.Shutdown(); }, "chargeaim_shutdown"); + }); } // namespace hacks::tf2::misc_aimbot