From b18647a623b39b4b82b63605f9042b0907ef4121 Mon Sep 17 00:00:00 2001 From: 0TheSpy <5511c282@opayq.com> Date: Thu, 10 Nov 2022 00:29:43 +0300 Subject: [PATCH] Update Skinchanger.cpp --- SpyCustom/Skinchanger.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/SpyCustom/Skinchanger.cpp b/SpyCustom/Skinchanger.cpp index 77b5001..830775b 100644 --- a/SpyCustom/Skinchanger.cpp +++ b/SpyCustom/Skinchanger.cpp @@ -505,12 +505,18 @@ void __fastcall hkFrameStageNotify(IBaseClientDLL* thisptr, void* edx, ClientFra if (opt.needupdate) { static auto clear_hud_weapon_icon_ptr = FindPatternV2("client.dll", "E8 ? ? ? ? 8B F0 C6 44 24 ? ? C6 44 24") + 1; static auto clearHudWeapon = reinterpret_cast(clear_hud_weapon_icon_ptr); - auto element = FindHudElement("CCSGO_HudWeaponSelection"); - auto hud_weapons = reinterpret_cast(std::uintptr_t(element) - 0x28); + auto element = FindHudElement("CCSGO_HudWeaponSelection"); + auto hud_weapons = reinterpret_cast(std::uintptr_t(element) - 0x28); + + printfdbg("clearHudWeapon %x hud_weapons %x \n", clearHudWeapon, hud_weapons); - if (hud_weapons && *hud_weapons->get_weapon_count() > 0) - for (std::int32_t i = 0; i < *hud_weapons->get_weapon_count(); i++) + if (hud_weapons) { + for (int i = 0; i < *(hud_weapons + 32); i++) { + printfdbg("hud_weapons %d\n", i); i = clearHudWeapon(hud_weapons, i); + } + } + opt.needupdate = 0; }