diff --git a/Gamehooking.hpp b/Gamehooking.hpp index a53f7fc..5cd3fe6 100644 --- a/Gamehooking.hpp +++ b/Gamehooking.hpp @@ -104,10 +104,15 @@ extern IsBoxVisible_t o_IsBoxVisible; typedef bool(__thiscall *IsHLTV_t)(void*); extern IsHLTV_t o_IsHLTV; +typedef void(__thiscall *CusorFunc_t)(void*); +extern CusorFunc_t o_LockCursor; +extern CusorFunc_t o_UnlockCursor; + namespace Handlers { void __fastcall PaintTraverse_h(void *thisptr, void*, unsigned int vguiPanel, bool forceRepaint, bool allowForce); bool __stdcall CreateMove_h(float smt, CUserCmd *userCMD); + void __fastcall LockCursor_h(void* ecx, void*); void __stdcall PlaySound_h(const char *folderIme); HRESULT __stdcall EndScene_h(IDirect3DDevice9 *pDevice); HRESULT __stdcall Reset_h(IDirect3DDevice9 *pDevice, D3DPRESENT_PARAMETERS *pPresentationParameters); diff --git a/Handlers.cpp b/Handlers.cpp index 87517a0..5ea0699 100644 --- a/Handlers.cpp +++ b/Handlers.cpp @@ -321,6 +321,14 @@ bool __stdcall Handlers::CreateMove_h(float smt, CUserCmd *userCMD) return false; } +void __fastcall Handlers::LockCursor_h(void* ecx, void*) +{ + if (menuOpen) + o_UnlockCursor(ecx); + else + o_LockCursor(ecx); +} + void __stdcall Handlers::PlaySound_h(const char *folderIme) { o_PlaySound(g_VGuiSurface, folderIme); @@ -672,7 +680,7 @@ bool __stdcall Handlers::InPrediction_h() { // Breaks more than it fixes. //// xref : "%8.4f : %30s : %5.3f : %4.2f +\n" https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/client/c_baseanimating.cpp#L1808 - //static DWORD inprediction_check = (DWORD)Utils::PatternScan(GetModuleHandle("client.dll"), "84 C0 74 17 8B 87"); + //static DWORD inprediction_check = (DWORD)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "84 C0 74 17 8B 87"); //if (inprediction_check == (DWORD)_ReturnAddress()) { // return true; // no sequence transition / decay //} @@ -1024,7 +1032,7 @@ float __fastcall Handlers::GetViewModelFov_h(void* ECX, void* EDX) bool __fastcall Handlers::GetBool_SVCheats_h(PVOID pConVar, int edx) { // xref : "Pitch: %6.1f Yaw: %6.1f Dist: %6.1f %16s" - static DWORD CAM_THINK = (DWORD)Utils::PatternScan(GetModuleHandle("client.dll"), "85 C0 75 30 38 86"); + static DWORD CAM_THINK = (DWORD)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "85 C0 75 30 38 86"); if (!pConVar) return false; @@ -1083,7 +1091,7 @@ bool __fastcall Handlers::WriteUsercmdDeltaToBuffer_h(IBaseClientDLL *ECX, void auto WriteUsercmd = [](bf_write *buf, CUserCmd *in, CUserCmd *out) { //using WriteUsercmd_t = void(__fastcall*)(bf_write*, CUserCmd*, CUserCmd*); - static DWORD WriteUsercmdF = (DWORD)Utils::PatternScan(GetModuleHandle("client.dll"), ("55 8B EC 83 E4 F8 51 53 56 8B D9 8B 0D")); + static DWORD WriteUsercmdF = (DWORD)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), ("55 8B EC 83 E4 F8 51 53 56 8B D9 8B 0D")); __asm { diff --git a/Install.cpp b/Install.cpp index cb3f7df..f145355 100644 --- a/Install.cpp +++ b/Install.cpp @@ -57,7 +57,7 @@ std::unique_ptr g_pClientModeHook = nullptr; std::unique_ptr g_pVguiSurfHook = nullptr; std::unique_ptr g_pD3DDevHook = nullptr; std::unique_ptr g_pClientHook = nullptr; -std::unique_ptr g_pGameEventManagerHook = nullptr; +//std::unique_ptr g_pGameEventManagerHook = nullptr; std::unique_ptr g_pMaterialSystemHook = nullptr; std::unique_ptr g_pDMEHook = nullptr; std::unique_ptr g_pInputInternalHook = nullptr; @@ -92,6 +92,8 @@ SendDatagram_t o_SendDatagram = nullptr; WriteUsercmdDeltaToBuffer_t o_WriteUsercmdDeltaToBuffer = nullptr; IsBoxVisible_t o_IsBoxVisible = nullptr; IsHLTV_t o_IsHLTV = nullptr; +CusorFunc_t o_LockCursor = nullptr; +CusorFunc_t o_UnlockCursor = nullptr; RecvVarProxyFn o_didSmokeEffect = nullptr; RecvVarProxyFn o_nSequence = nullptr; @@ -113,10 +115,10 @@ unsigned long __stdcall Installer::installGladiator(void *unused) Utils::ConsolePrint(true, "-= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -= -\n"); Utils::ConsolePrint(true, "Initializing cheat...\n"); - g_CHLClient = Iface::IfaceMngr::getIface("client.dll", "VClient0"); - g_EntityList = Iface::IfaceMngr::getIface("client.dll", "VClientEntityList"); - g_Prediction = Iface::IfaceMngr::getIface("client.dll", "VClientPrediction"); - g_GameMovement = Iface::IfaceMngr::getIface("client.dll", "GameMovement"); + g_CHLClient = Iface::IfaceMngr::getIface("client_panorama.dll", "VClient0"); + g_EntityList = Iface::IfaceMngr::getIface("client_panorama.dll", "VClientEntityList"); + g_Prediction = Iface::IfaceMngr::getIface("client_panorama.dll", "VClientPrediction"); + g_GameMovement = Iface::IfaceMngr::getIface("client_panorama.dll", "GameMovement"); g_MdlCache = Iface::IfaceMngr::getIface("datacache.dll", "MDLCache"); g_EngineClient = Iface::IfaceMngr::getIface("engine.dll", "VEngineClient"); g_MdlInfo = Iface::IfaceMngr::getIface("engine.dll", "VModelInfoClient"); @@ -136,11 +138,12 @@ unsigned long __stdcall Installer::installGladiator(void *unused) g_Localize = Iface::IfaceMngr::getIface("localize.dll", "Localize_"); g_GlobalVars = **(CGlobalVarsBase***)((*(DWORD**)(g_CHLClient))[0] + 0x1B); - g_Input = *(CInput**)((*(DWORD**)g_CHLClient)[15] + 0x1); + //g_Input = *(CInput**)((*(DWORD**)g_CHLClient)[15] + 0x1); + g_ClientMode = **(IClientMode***)((*(DWORD**)g_CHLClient)[10] + 0x5); g_pMemAlloc = *(IMemAlloc**)(GetProcAddress(GetModuleHandle("tier0.dll"), "g_pMemAlloc")); - auto client = GetModuleHandle("client.dll"); + auto client = GetModuleHandle("client_panorama.dll"); auto engine = GetModuleHandle("engine.dll"); auto dx9api = GetModuleHandle("shaderapidx9.dll"); @@ -148,6 +151,7 @@ unsigned long __stdcall Installer::installGladiator(void *unused) g_GlowObjManager = *(CGlowObjectManager**)(Utils::PatternScan(client, "0F 11 05 ? ? ? ? 83 C8 01") + 3); g_MoveHelper = **(IMoveHelper***)(Utils::PatternScan(client, "8B 0D ? ? ? ? 8B 45 ? 51 8B D4 89 02 8B 01") + 2); g_RenderBeams = *(IViewRenderBeams**)(Utils::PatternScan(client, "A1 ? ? ? ? FF 10 A1 ? ? ? ? B9") + 0x1); + g_Input = *(CInput**)(Utils::PatternScan(client, "B9 ? ? ? ? F3 0F 11 04 24 FF 50 10") + 0x1); auto D3DDevice9 = **(IDirect3DDevice9***)(Utils::PatternScan(dx9api, "A1 ? ? ? ? 50 8B 08 FF 51 0C") + 1); auto dwFireBullets = *(DWORD**)(Utils::PatternScan(client, "55 8B EC 51 53 56 8B F1 BB ? ? ? ? B8") + 0x131); @@ -166,7 +170,7 @@ unsigned long __stdcall Installer::installGladiator(void *unused) g_pDMEHook = std::make_unique(); g_pD3DDevHook = std::make_unique(); g_pClientHook = std::make_unique(); - g_pGameEventManagerHook = std::make_unique(); + //g_pGameEventManagerHook = std::make_unique(); g_pSceneEndHook = std::make_unique(); g_pVguiPanelHook = std::make_unique(); g_pVguiSurfHook = std::make_unique(); @@ -183,7 +187,7 @@ unsigned long __stdcall Installer::installGladiator(void *unused) g_pDMEHook->Setup(g_MdlRender); g_pD3DDevHook->Setup(D3DDevice9); g_pClientHook->Setup(g_CHLClient); - g_pGameEventManagerHook->Setup(g_GameEvents); + //g_pGameEventManagerHook->Setup(g_GameEvents); g_pSceneEndHook->Setup(g_RenderView); g_pVguiPanelHook->Setup(g_VGuiPanel); g_pVguiSurfHook->Setup(g_VGuiSurface); @@ -204,27 +208,28 @@ unsigned long __stdcall Installer::installGladiator(void *unused) g_pClientModeHook->Hook(35, Handlers::GetViewModelFov_h); g_pClientModeHook->Hook(18, Handlers::OverrideView_h); g_pClientModeHook->Hook(24, Handlers::CreateMove_h); - g_pClientHook->Hook(36, Handlers::FrameStageNotify_h); - g_pGameEventManagerHook->Hook(9, Handlers::FireEventClientSide_h); + g_pClientHook->Hook(37, Handlers::FrameStageNotify_h); + //g_pGameEventManagerHook->Hook(9, Handlers::FireEventClientSide_h); g_pPredictionHook->Hook(14, Handlers::InPrediction_h); g_pPredictionHook->Hook(19, Handlers::RunCommand_h); g_pVguiPanelHook->Hook(41, Handlers::PaintTraverse_h); g_pMaterialSystemHook->Hook(42, Handlers::BeginFrame_h); g_pConvarHook->Hook(13, Handlers::GetBool_SVCheats_h); g_pVguiSurfHook->Hook(82, Handlers::PlaySound_h); + g_pVguiSurfHook->Hook(67, Handlers::LockCursor_h); g_pSceneEndHook->Hook(9, Handlers::SceneEnd_h); g_pD3DDevHook->Hook(42, Handlers::EndScene_h); g_pD3DDevHook->Hook(16, Handlers::Reset_h); g_pEngineClientHook->Hook(32, Handlers::IsBoxVisible_h); - g_pEngineClientHook->Hook(93, Handlers::IsHLTV_h); + g_pEngineClientHook->Hook(94, Handlers::IsHLTV_h); o_SetMouseCodeState = g_pInputInternalHook->GetOriginal(92); o_SetKeyCodeState = g_pInputInternalHook->GetOriginal(91); o_GetViewmodelFov = g_pClientModeHook->GetOriginal(35); o_OverrideView = g_pClientModeHook->GetOriginal(18); o_CreateMove = g_pClientModeHook->GetOriginal(24); - o_FrameStageNotify = g_pClientHook->GetOriginal(36); - o_FireEventClientSide = g_pGameEventManagerHook->GetOriginal(9); + o_FrameStageNotify = g_pClientHook->GetOriginal(37); + //o_FireEventClientSide = g_pGameEventManagerHook->GetOriginal(9); o_OriginalInPrediction = g_pPredictionHook->GetOriginal(14); o_RunCommand = g_pPredictionHook->GetOriginal(19); o_PaintTraverse = g_pVguiPanelHook->GetOriginal(41); @@ -235,7 +240,9 @@ unsigned long __stdcall Installer::installGladiator(void *unused) o_EndScene = g_pD3DDevHook->GetOriginal(42); o_Reset = g_pD3DDevHook->GetOriginal(16); o_IsBoxVisible = g_pEngineClientHook->GetOriginal(32); - o_IsHLTV = g_pEngineClientHook->GetOriginal(93); + o_IsHLTV = g_pEngineClientHook->GetOriginal(94); + o_UnlockCursor = g_pVguiSurfHook->GetOriginal(66); + o_LockCursor = g_pVguiSurfHook->GetOriginal(67); #ifdef INSTANT_DEFUSE_PLANT_EXPLOIT o_WriteUsercmdDeltaToBuffer = g_pClientHook->Hook(23, (WriteUsercmdDeltaToBuffer_t)Handlers::WriteUsercmdDeltaToBuffer_h); @@ -266,7 +273,7 @@ void Installer::uninstallGladiator() g_pDMEHook->RestoreTable(); g_pD3DDevHook->RestoreTable(); g_pClientHook->RestoreTable(); - g_pGameEventManagerHook->RestoreTable(); + //g_pGameEventManagerHook->RestoreTable(); g_pSceneEndHook->RestoreTable(); g_pVguiPanelHook->RestoreTable(); g_pVguiSurfHook->RestoreTable(); diff --git a/Menu.cpp b/Menu.cpp index 370d929..7a99869 100644 --- a/Menu.cpp +++ b/Menu.cpp @@ -264,82 +264,86 @@ namespace GladiatorMenu ImGui_ImplDX9_Init(window, pDevice); ImGuiStyle &style = ImGui::GetStyle(); - - ImVec4 col_text = ImColor::HSV(hue / 255.f, 20.f / 255.f, 235.f / 255.f); - ImVec4 col_main = ImColor(0, 153, 204); //ImColor(9, 82, 128); - ImVec4 col_back = ImColor(31, 44, 54); - ImVec4 col_area = ImColor(4, 32, 41); - - ImVec4 col_title = ImColor(49, 69, 101); - - style.Colors[ImGuiCol_Text] = ImVec4(col_text.x, col_text.y, col_text.z, 1.00f); - style.Colors[ImGuiCol_TextDisabled] = ImVec4(col_text.x, col_text.y, col_text.z, 0.58f); - style.Colors[ImGuiCol_WindowBg] = ImVec4(col_back.x, col_back.y, col_back.z, 0.85f); - style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(col_area.x, col_area.y, col_area.z, 0.00f); - style.Colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.30f); - style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); - style.Colors[ImGuiCol_FrameBg] = ImVec4(col_area.x, col_area.y, col_area.z, col_area.w + .1f); - style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(255, 255, 255, 0.25f); - style.Colors[ImGuiCol_FrameBgActive] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_TitleBg] = ImVec4(col_title.x, col_title.y, col_title.z, 0.85f); - style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(col_title.x, col_title.y, col_title.z, 0.90f); - style.Colors[ImGuiCol_TitleBgActive] = ImVec4(col_title.x, col_title.y, col_title.z, 0.95f); - style.Colors[ImGuiCol_MenuBarBg] = ImVec4(col_area.x, col_area.y, col_area.z, 0.57f); - style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(col_area.x, col_area.y, col_area.z, 1.00f); - style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(col_main.x, col_main.y, col_main.z, 0.85f); - style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 0.90f); - style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_ComboBg] = ImVec4(col_area.x, col_area.y, col_area.z, 1.00f); - style.Colors[ImGuiCol_CheckMark] = ImVec4(0.95f, 0.05f, 0.10f, 0.65f); - style.Colors[ImGuiCol_SliderGrab] = ImVec4(col_main.x, col_main.y, col_main.z, 0.90f); - style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_Button] = ImVec4(col_main.x, col_main.y, col_main.z, 0.44f); - style.Colors[ImGuiCol_ButtonHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 0.86f); - style.Colors[ImGuiCol_ButtonActive] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_Header] = ImVec4(col_main.x, col_main.y, col_main.z, 0.76f); - style.Colors[ImGuiCol_HeaderHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 0.86f); - style.Colors[ImGuiCol_HeaderActive] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_Column] = ImVec4(col_text.x, col_text.y, col_text.z, 0.32f); - style.Colors[ImGuiCol_ColumnHovered] = ImVec4(col_text.x, col_text.y, col_text.z, 0.78f); - style.Colors[ImGuiCol_ColumnActive] = ImVec4(col_text.x, col_text.y, col_text.z, 1.00f); - style.Colors[ImGuiCol_ResizeGrip] = ImVec4(col_main.x, col_main.y, col_main.z, 0.20f); - style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 0.78f); - style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_CloseButton] = ImVec4(0.85, 0.10, 0.10, 0.65f); - style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.85, 0.10, 0.10, 0.75f); - style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.85, 0.10, 0.10, 0.85f); - style.Colors[ImGuiCol_PlotLines] = ImVec4(col_text.x, col_text.y, col_text.z, 0.63f); - style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_PlotHistogram] = ImVec4(col_text.x, col_text.y, col_text.z, 0.63f); - style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f); - style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(col_main.x, col_main.y, col_main.z, 0.43f); - style.Colors[ImGuiCol_PopupBg] = ImVec4(col_main.x, col_main.y, col_main.z, 0.92f); - style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f); - - style.Alpha = 1.0f; - style.WindowPadding = ImVec2(4, 4); - style.WindowMinSize = ImVec2(32, 32); - style.WindowRounding = 3.f; - style.WindowTitleAlign = ImVec2(0.5f, 0.5f); - style.ChildWindowRounding = 2.5f; - style.FramePadding = ImVec2(2, 2); - style.FrameRounding = 0.f; - style.ItemSpacing = ImVec2(6, 4); - style.ItemInnerSpacing = ImVec2(4, 4); - style.TouchExtraPadding = ImVec2(0, 0); - style.IndentSpacing = 21.0f; - style.ColumnsMinSpacing = 3.0f; - style.ScrollbarSize = 12.0f; - style.ScrollbarRounding = 0.0f; - style.GrabMinSize = 10.0f; - style.GrabRounding = 3.0f; - style.ButtonTextAlign = ImVec2(0.5f, 0.5f); - style.DisplayWindowPadding = ImVec2(22, 22); - style.DisplaySafeAreaPadding = ImVec2(4, 4); - style.AntiAliasedLines = true; - style.AntiAliasedShapes = true; + + ImVec4 col_text = ImColor::HSV(hue / 255.f, 20.f / 255.f, 235.f / 255.f); + ImVec4 col_main = ImColor(0, 153, 204); //ImColor(9, 82, 128); + ImVec4 col_back = ImColor(31, 44, 54); + ImVec4 col_area = ImColor(4, 32, 41); + ImVec4 col_theme = ImColor(130, 177, 255); + + ImVec4 col_title = ImColor(49, 69, 101); + + style.Colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); + style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f); + style.Colors[ImGuiCol_WindowBg] = ImVec4(0.11f, 0.10f, 0.11f, 1.00f); + style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_PopupBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_FrameBg] = ImVec4(0.21f, 0.20f, 0.21f, 0.60f); + style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_TitleBg] = ImVec4(0.00f, 0.46f, 0.65f, 0.91f); + style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.46f, 0.65f, 0.91f); + style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.00f, 0.46f, 0.65f, 0.91f); + style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.00f, 0.46f, 0.65f, 0.00f); + style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.00f, 0.46f, 0.65f, 0.44f); + style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.00f, 0.46f, 0.65f, 0.74f); + style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_ComboBg] = ImVec4(col_area.x, col_area.y, col_area.z, 1.00f); + style.Colors[ImGuiCol_CheckMark] = ImVec4(col_theme.x, col_theme.y, col_theme.z, 1.00f); + // style.Colors[ImGuiCol_CheckMark] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_Button] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_Header] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.00f, 0.46f, 0.65f, 1.00f); + style.Colors[ImGuiCol_Column] = ImVec4(0.50f, 0.50f, 0.50f, 0.33f); + style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.50f, 0.50f, 0.50f, 0.47f); + style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f); + style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f); + style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f); + style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f); + style.Colors[ImGuiCol_CloseButton] = ImVec4(1.00f, 0.10f, 0.24f, 0.00f); + style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.00f, 0.10f, 0.24f, 0.00f); + style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(1.00f, 0.10f, 0.24f, 0.00f); + style.Colors[ImGuiCol_PlotLines] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(col_main.x, col_main.y, col_main.z, 0.43f); + style.Colors[ImGuiCol_PopupBg] = ImVec4(col_main.x, col_main.y, col_main.z, 0.92f); + style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + + style.Alpha = 1.0f; + style.WindowPadding = ImVec2(8, 8); + style.WindowRounding = 0.0f; + style.WindowTitleAlign = ImVec2(0.5f, 0.5f); + style.ChildWindowRounding = 3.0f; + style.FramePadding = ImVec2(4, 3); + style.FrameRounding = 0.0f; + style.ItemSpacing = ImVec2(8, 4); + style.ItemInnerSpacing = ImVec2(4, 4); + style.TouchExtraPadding = ImVec2(0, 0); + style.IndentSpacing = 21.0f; + style.ColumnsMinSpacing = 6.0f; + style.ScrollbarSize = 10.0f; + style.ScrollbarRounding = 3.0f; + style.GrabMinSize = 10.0f; + style.GrabRounding = 0.0f; + style.ButtonTextAlign = ImVec2(0.5f, 0.5f); + style.DisplayWindowPadding = ImVec2(22, 22); + style.DisplaySafeAreaPadding = ImVec2(4, 4); + style.AntiAliasedLines = true; + style.AntiAliasedShapes = true; + style.CurveTessellationTol = 1.25f; + style.AntiAliasedLines = true; + style.AntiAliasedShapes = true; style.CurveTessellationTol = 1.25f; - style.WindowPadThickness = 4.f; d3dinit = true; cheat_font = ImGui::GetIO().Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Arial.ttf", 13); @@ -376,8 +380,9 @@ namespace GladiatorMenu if (bPrevMenuState != menuOpen) { - std::string msg = "cl_mouseenable " + std::to_string(!menuOpen); - g_EngineClient->ExecuteClientCmd(msg.c_str()); + // outdated (nkpl) + //std::string msg = "cl_mouseenable " + std::to_string(!menuOpen); + //g_EngineClient->ExecuteClientCmd(msg.c_str()); } bPrevMenuState = menuOpen; @@ -733,7 +738,7 @@ namespace GladiatorMenu ImGui::ColorPickerBox("##Picker_nightmode", g_Options.visuals_others_nightmode_color); #endif - ImGui::Combo("Skybox##ESP", &g_Options.visuals_others_sky, opt_Skynames, 15); + //ImGui::Combo("Skybox##ESP", &g_Options.visuals_others_sky, opt_Skynames, 15); ImGui::EndChild(); } diff --git a/Structs.cpp b/Structs.cpp index d154051..1f9a33b 100644 --- a/Structs.cpp +++ b/Structs.cpp @@ -42,7 +42,7 @@ WeapInfo_t *C_BaseCombatWeapon::GetWeapInfo() return NULL; typedef WeapInfo_t *(__thiscall *o_getWeapInfo)(void*); - return VT::vfunc(this, 447)(this); + return VT::vfunc(this, 444)(this); } bool C_BaseCombatWeapon::HasBullets() @@ -65,13 +65,13 @@ bool C_BaseCombatWeapon::CanFire() bool C_BaseCombatWeapon::IsReloading() { - static auto inReload = *(uint32_t*)(Utils::PatternScan(GetModuleHandle("client.dll"), "C6 87 ? ? ? ? ? 8B 06 8B CE FF 90") + 2); + static auto inReload = *(uint32_t*)(Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "C6 87 ? ? ? ? ? 8B 06 8B CE FF 90") + 2); return *(bool*)((uintptr_t)this + inReload); } bool C_BaseCombatWeapon::IsRifle() { - switch (GetWeapInfo()->weapon_type) + switch (GetWeapInfo()->weapon_type()) { case WEAPONTYPE_RIFLE: return true; @@ -88,7 +88,7 @@ bool C_BaseCombatWeapon::IsRifle() bool C_BaseCombatWeapon::IsPistol() { - switch (GetWeapInfo()->weapon_type) + switch (GetWeapInfo()->weapon_type()) { case WEAPONTYPE_PISTOL: return true; @@ -99,7 +99,7 @@ bool C_BaseCombatWeapon::IsPistol() bool C_BaseCombatWeapon::IsSniper() { - switch (GetWeapInfo()->weapon_type) + switch (GetWeapInfo()->weapon_type()) { case WEAPONTYPE_SNIPER_RIFLE: return true; @@ -110,7 +110,7 @@ bool C_BaseCombatWeapon::IsSniper() bool C_BaseCombatWeapon::IsGrenade() { - switch (GetWeapInfo()->weapon_type) + switch (GetWeapInfo()->weapon_type()) { case WEAPONTYPE_GRENADE: return true; @@ -121,17 +121,17 @@ bool C_BaseCombatWeapon::IsGrenade() float C_BaseCombatWeapon::GetInaccuracy() { - return VT::vfunc(this, 470)(this); + return VT::vfunc(this, 467)(this); } float C_BaseCombatWeapon::GetSpread() { - return VT::vfunc(this, 439)(this); + return VT::vfunc(this, 437)(this); } void C_BaseCombatWeapon::UpdateAccuracyPenalty() { - VT::vfunc(this, 471)(this); + VT::vfunc(this, 469)(this); } bool C_BaseCombatWeapon::IsWeaponNonAim() @@ -314,6 +314,7 @@ AnimationLayer *C_BasePlayer::GetAnimOverlay(int i) { if (i < 15) return &GetAnimOverlays()[i]; + return nullptr; } int C_BasePlayer::GetSequenceActivity(int sequence) @@ -334,7 +335,7 @@ int C_BasePlayer::GetSequenceActivity(int sequence) C_CSGOPlayerAnimState *C_BasePlayer::GetPlayerAnimState() { - return (C_CSGOPlayerAnimState*)((uintptr_t)this + 0x3870); + return (C_CSGOPlayerAnimState*)((uintptr_t)this + 0x3884); } void C_BasePlayer::UpdateAnimationState(C_CSGOPlayerAnimState *state, QAngle angle) @@ -342,7 +343,7 @@ void C_BasePlayer::UpdateAnimationState(C_CSGOPlayerAnimState *state, QAngle ang if (!state) return; - static auto UpdateAnimState = Utils::PatternScan(GetModuleHandle("client.dll"), "55 8B EC 83 E4 F8 83 EC 18 56 57 8B F9 F3 0F 11 54 24"); + static auto UpdateAnimState = Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 83 E4 F8 83 EC 18 56 57 8B F9 F3 0F 11 54 24"); if (!UpdateAnimState) return; @@ -363,7 +364,7 @@ void C_BasePlayer::ResetAnimationState(C_CSGOPlayerAnimState *state) return; using ResetAnimState_t = void(__thiscall*)(C_CSGOPlayerAnimState*); - static auto ResetAnimState = (ResetAnimState_t)Utils::PatternScan(GetModuleHandle("client.dll"), "56 6A 01 68 ? ? ? ? 8B F1"); + static auto ResetAnimState = (ResetAnimState_t)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "56 6A 01 68 ? ? ? ? 8B F1"); if (!ResetAnimState) return; @@ -373,7 +374,7 @@ void C_BasePlayer::ResetAnimationState(C_CSGOPlayerAnimState *state) void C_BasePlayer::CreateAnimationState(C_CSGOPlayerAnimState *state) { using CreateAnimState_t = void(__thiscall*)(C_CSGOPlayerAnimState*, C_BasePlayer*); - static auto CreateAnimState = (CreateAnimState_t)Utils::PatternScan(GetModuleHandle("client.dll"), "55 8B EC 56 8B F1 B9 ? ? ? ? C7 46"); + static auto CreateAnimState = (CreateAnimState_t)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 56 8B F1 B9 ? ? ? ? C7 46"); if (!CreateAnimState) return; @@ -462,7 +463,7 @@ bool C_BasePlayer::HandleBoneSetup(int32_t boneMask, matrix3x4_t *boneOut, float return true; } -const Vector &C_BasePlayer::WorldSpaceCenter() +const Vector C_BasePlayer::WorldSpaceCenter() { Vector vecOrigin = m_vecOrigin(); @@ -549,7 +550,7 @@ bool C_BasePlayer::HasC4() { static auto fnHasC4 = reinterpret_cast( - Utils::PatternScan(GetModuleHandle("client.dll"), "56 8B F1 85 F6 74 31") + Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "56 8B F1 85 F6 74 31") ); return fnHasC4(this); @@ -650,7 +651,7 @@ VarMapping_t *C_BasePlayer::VarMapping() void C_BasePlayer::SetAbsOrigin(const Vector &origin) { using SetAbsOriginFn = void(__thiscall*)(void*, const Vector &origin); - static SetAbsOriginFn SetAbsOrigin = (SetAbsOriginFn)Utils::PatternScan(GetModuleHandle("client.dll"), "55 8B EC 83 E4 F8 51 53 56 57 8B F1 E8"); + static SetAbsOriginFn SetAbsOrigin = (SetAbsOriginFn)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 83 E4 F8 51 53 56 57 8B F1 E8"); SetAbsOrigin(this, origin); } @@ -658,7 +659,7 @@ void C_BasePlayer::SetAbsOrigin(const Vector &origin) void C_BasePlayer::SetAbsAngles(const QAngle &angles) { using SetAbsAnglesFn = void(__thiscall*)(void*, const QAngle &angles); - static SetAbsAnglesFn SetAbsAngles = (SetAbsAnglesFn)Utils::PatternScan(GetModuleHandle("client.dll"), "55 8B EC 83 E4 F8 83 EC 64 53 56 57 8B F1 E8"); + static SetAbsAnglesFn SetAbsAngles = (SetAbsAnglesFn)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 83 E4 F8 83 EC 64 53 56 57 8B F1 E8"); SetAbsAngles(this, angles); } diff --git a/Structs.hpp b/Structs.hpp index 592e7f9..2c2a82f 100644 --- a/Structs.hpp +++ b/Structs.hpp @@ -64,19 +64,40 @@ class CStudioHdr; class WeapInfo_t { public: + __int32 weapon_type() + { + return *reinterpret_cast<__int32*>(reinterpret_cast(this) + 0xC8); + } + + __int32 m_iDamage() + { + return *reinterpret_cast<__int32*>(reinterpret_cast(this) + 0xF0); + } - char pad00[0xC8]; - __int32 weapon_type; - char padCC[0x20]; - __int32 m_iDamage; - float m_fArmorRatio; - char padF4[0x4]; - float m_fPenetration; - char padFC[0x8]; - float m_fRange; - float m_fRangeModifier; - char pad10C[0x10]; - bool m_bHasSilencer; + float m_fArmorRatio() + { + return *reinterpret_cast(reinterpret_cast(this) + 0xF4); + } + + float m_fPenetration() + { + return *reinterpret_cast(reinterpret_cast(this) + 0xFC); + } + + float m_fRange() + { + return *reinterpret_cast(reinterpret_cast(this) + 0x108); + } + + float m_fRangeModifier() + { + return *reinterpret_cast(reinterpret_cast(this) + 0x10C); + } + + bool m_bHasSilencer() + { + return *reinterpret_cast(reinterpret_cast(this) + 0x120); + } }; class C_BaseEntity : public IClientEntity @@ -150,7 +171,7 @@ class C_BaseCombatWeapon : public C_BaseAttributableItem public: NETVAR(float_t, m_flNextPrimaryAttack, "CBaseCombatWeapon", "m_flNextPrimaryAttack"); - NETVAR(int32_t, m_iItemDefinitionIndex, "CBaseCombatWeapon", "m_iItemDefinitionIndex"); + NETVAR(int16_t, m_iItemDefinitionIndex, "CBaseCombatWeapon", "m_iItemDefinitionIndex"); NETVAR(int32_t, m_iClip1, "CBaseCombatWeapon", "m_iClip1"); NETVAR(int32_t, m_iViewModelIndex, "CBaseCombatWeapon", "m_iViewModelIndex"); NETVAR(int32_t, m_iWorldModelIndex, "CBaseCombatWeapon", "m_iWorldModelIndex"); @@ -291,7 +312,7 @@ class C_BasePlayer : public C_BaseEntity bool HandleBoneSetup(int32_t boneMask, matrix3x4_t *boneOut, float_t curtime); - const Vector &WorldSpaceCenter(); + const Vector WorldSpaceCenter(); Vector GetEyePos(); player_info_t GetPlayerInfo(); std::string GetName(bool console_safe = false); diff --git a/features/AimLegit.cpp b/features/AimLegit.cpp index 6ce02b7..eea2a5c 100644 --- a/features/AimLegit.cpp +++ b/features/AimLegit.cpp @@ -197,7 +197,7 @@ void AimLegit::Triggerbot() Math::AngleVectors(viewangles, forward); - forward *= g_LocalPlayer->m_hActiveWeapon().Get()->GetWeapInfo()->m_fRange; + forward *= g_LocalPlayer->m_hActiveWeapon().Get()->GetWeapInfo()->m_fRange(); rem = src + forward; diff --git a/features/AimRage.cpp b/features/AimRage.cpp index fd03e30..dfb4ba9 100644 --- a/features/AimRage.cpp +++ b/features/AimRage.cpp @@ -374,7 +374,7 @@ bool AimRage::HitChance(QAngle angles, C_BasePlayer *ent, float chance) Math::AngleVectors(viewAnglesSpread, viewForward); viewForward.NormalizeInPlace(); - viewForward = src + (viewForward * weapon->GetWeapInfo()->m_fRange); + viewForward = src + (viewForward * weapon->GetWeapInfo()->m_fRange()); trace_t tr; Ray_t ray; @@ -558,11 +558,11 @@ bool AimRage::SimulateFireBullet(C_BaseCombatWeapon *weap, FireBulletData &data, if (weaponData == NULL) return false; - data.current_damage = (float)weaponData->m_iDamage; + data.current_damage = (float)weaponData->m_iDamage(); while ((data.penetrate_count > 0) && (data.current_damage >= 1.0f)) { - data.trace_length_remaining = weaponData->m_fRange - data.trace_length; + data.trace_length_remaining = weaponData->m_fRange() - data.trace_length; Vector end = data.src + data.direction * data.trace_length_remaining; @@ -585,9 +585,9 @@ bool AimRage::SimulateFireBullet(C_BaseCombatWeapon *weap, FireBulletData &data, float enter_surf_penetration_mod = enter_surface_data->game.flPenetrationModifier; data.trace_length += data.enter_trace.fraction * data.trace_length_remaining; - data.current_damage *= pow(weaponData->m_fRangeModifier, data.trace_length * 0.002); + data.current_damage *= pow(weaponData->m_fRangeModifier(), data.trace_length * 0.002); - if (data.trace_length > 3000.f && weaponData->m_fPenetration > 0.f || enter_surf_penetration_mod < 0.1f) + if (data.trace_length > 3000.f && weaponData->m_fPenetration() > 0.f || enter_surf_penetration_mod < 0.1f) break; if ((data.enter_trace.hitgroup <= 7) && (data.enter_trace.hitgroup > 0)) @@ -596,7 +596,7 @@ bool AimRage::SimulateFireBullet(C_BaseCombatWeapon *weap, FireBulletData &data, if (pPlayer->IsPlayer() && pPlayer->m_iTeamNum() == g_LocalPlayer->m_iTeamNum()) return false; - ScaleDamage(data.enter_trace.hitgroup, pPlayer, weaponData->m_fArmorRatio, data.current_damage); + ScaleDamage(data.enter_trace.hitgroup, pPlayer, weaponData->m_fArmorRatio(), data.current_damage); return true; } @@ -623,7 +623,7 @@ bool AimRage::HandleBulletPenetration(WeapInfo_t *wpn_data, FireBulletData &data return false; } - if (data.penetrate_count <= 0 || wpn_data->m_fPenetration <= 0.f) + if (data.penetrate_count <= 0 || wpn_data->m_fPenetration() <= 0.f) return false; Vector dummy; @@ -669,7 +669,7 @@ bool AimRage::HandleBulletPenetration(WeapInfo_t *wpn_data, FireBulletData &data float modifier = fmaxf(0.0f, 1.0f / combined_penetration_modifier); float thickness = (trace_exit.endpos - data.enter_trace.endpos).LengthSqr(); - float taken_damage = ((modifier * 3.0f) * fmaxf(0.0f, (3.0f / wpn_data->m_fPenetration) * 1.25f) + (data.current_damage * final_damage_modifier)) + ((thickness * modifier) / 24.0f); + float taken_damage = ((modifier * 3.0f) * fmaxf(0.0f, (3.0f / wpn_data->m_fPenetration()) * 1.25f) + (data.current_damage * final_damage_modifier)) + ((thickness * modifier) / 24.0f); float lost_damage = fmaxf(0.0f, taken_damage); @@ -762,7 +762,7 @@ bool AimRage::TraceToExit(Vector &end, CGameTrace *enter_trace, Vector start, Ve bool AimRage::IsBreakableEntity(C_BasePlayer *ent) { typedef bool(__thiscall *isBreakbaleEntityFn)(C_BasePlayer*); - static isBreakbaleEntityFn IsBreakableEntityFn = (isBreakbaleEntityFn)Utils::PatternScan(GetModuleHandle("client.dll"), "55 8B EC 51 56 8B F1 85 F6 74 68"); + static isBreakbaleEntityFn IsBreakableEntityFn = (isBreakbaleEntityFn)Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 51 56 8B F1 85 F6 74 68"); if (IsBreakableEntityFn) { @@ -940,4 +940,5 @@ int AimRage::GetTickbase(CUserCmd* ucmd) { } g_pLastCmd = ucmd; + return g_tick; } \ No newline at end of file diff --git a/features/AntiAim.cpp b/features/AntiAim.cpp index 621943a..a833759 100644 --- a/features/AntiAim.cpp +++ b/features/AntiAim.cpp @@ -34,14 +34,14 @@ void AntiAim::Work(CUserCmd *usercmd) if (weapon->CanFirePostPone() && (usercmd->buttons & IN_ATTACK)) return; } - else if (weapon->GetWeapInfo()->weapon_type == WEAPONTYPE_GRENADE) + else if (weapon->GetWeapInfo()->weapon_type() == WEAPONTYPE_GRENADE) { if (weapon->IsInThrow()) return; } else { - if (weapon->GetWeapInfo()->weapon_type == WEAPONTYPE_KNIFE && ((usercmd->buttons & IN_ATTACK) || (usercmd->buttons & IN_ATTACK2))) + if (weapon->GetWeapInfo()->weapon_type() == WEAPONTYPE_KNIFE && ((usercmd->buttons & IN_ATTACK) || (usercmd->buttons & IN_ATTACK2))) return; else if ((usercmd->buttons & IN_ATTACK) && (weapon->m_iItemDefinitionIndex() != WEAPON_C4 || g_Options.hvh_antiaim_x != AA_PITCH_OFF)) return; diff --git a/features/KitParser.cpp b/features/KitParser.cpp index c609eb7..9ac1bfb 100644 --- a/features/KitParser.cpp +++ b/features/KitParser.cpp @@ -100,7 +100,7 @@ void InitializeKits() // call CEconItemSchema::GetPaintKitDefinition - auto sig_address = Utils::PatternScan(GetModuleHandle("client.dll"), "E8 ?? ?? ?? ?? FF 76 0C 8D 48 04 E8"); + auto sig_address = Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "E8 ?? ?? ?? ?? FF 76 0C 8D 48 04 E8"); // Skip the opcode, read rel32 address auto item_system_offset = *reinterpret_cast< int32_t* >(sig_address + 1); diff --git a/features/PlayerHurt.cpp b/features/PlayerHurt.cpp index 6f566cc..6cb1d41 100644 --- a/features/PlayerHurt.cpp +++ b/features/PlayerHurt.cpp @@ -55,6 +55,7 @@ void PlayerHurtEvent::FireGameEvent(IGameEvent *event) case HITGROUP_GEAR: return "gear"; } + return "generic"; }; EventInfo info; diff --git a/features/PredictionSystem.cpp b/features/PredictionSystem.cpp index d8a5860..0684608 100644 --- a/features/PredictionSystem.cpp +++ b/features/PredictionSystem.cpp @@ -5,7 +5,7 @@ void PredictionSystem::Start(CUserCmd *userCMD, C_BasePlayer* player) { *predictionRandomSeed = MD5_PseudoRandom(userCMD->command_number) & 0x7FFFFFFF; - predictionPlayer = player; + //predictionPlayer = player; m_flOldCurTime = g_GlobalVars->curtime; m_flOldFrametime = g_GlobalVars->frametime; @@ -36,7 +36,7 @@ void PredictionSystem::End(C_BasePlayer* player) g_MoveHelper->SetHost(nullptr); *predictionRandomSeed = -1; - predictionPlayer = nullptr; + //predictionPlayer = nullptr; g_GlobalVars->curtime = m_flOldCurTime; g_GlobalVars->frametime = m_flOldFrametime; diff --git a/features/PredictionSystem.hpp b/features/PredictionSystem.hpp index 134f805..1b87772 100644 --- a/features/PredictionSystem.hpp +++ b/features/PredictionSystem.hpp @@ -8,9 +8,9 @@ class PredictionSystem : public Singleton public: PredictionSystem() { - auto client = GetModuleHandle("client.dll"); + auto client = GetModuleHandle("client_panorama.dll"); predictionRandomSeed = *(int**)(Utils::PatternScan(client, "8B 0D ? ? ? ? BA ? ? ? ? E8 ? ? ? ? 83 C4 04") + 2); - predictionPlayer = *reinterpret_cast(Utils::PatternScan(client, "89 3D ? ? ? ? F3 0F 10 47") + 2); + //predictionPlayer = *reinterpret_cast(Utils::PatternScan(client, "89 3D ? ? ? ? F3 0F 10 47") + 2); // TODO } void Start(CUserCmd *userCMD, C_BasePlayer* player); diff --git a/features/Skinchanger.cpp b/features/Skinchanger.cpp index aa48e6b..6f21336 100644 --- a/features/Skinchanger.cpp +++ b/features/Skinchanger.cpp @@ -443,7 +443,7 @@ void Skinchanger::Work() // He he { static auto set_abs_origin_fn = reinterpret_cast< void(__thiscall*)(void*, const Vector&) > - (Utils::PatternScan(GetModuleHandle("client.dll"), "55 8B EC 83 E4 F8 51 53 56 57 8B F1")); + (Utils::PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 83 E4 F8 51 53 56 57 8B F1")); static const Vector new_pos = { 10000.f, 10000.f, 10000.f }; diff --git a/helpers/Utils.cpp b/helpers/Utils.cpp index 1b77daa..6862c69 100644 --- a/helpers/Utils.cpp +++ b/helpers/Utils.cpp @@ -232,7 +232,7 @@ namespace Utils HMODULE hModule; MODULEINFO moduleInfo; - DWORD dModule, dModuleSize; + DWORD dModule; hModule = GetModuleHandle(moduleName); GetModuleInformation(GetCurrentProcess(), hModule, &moduleInfo, sizeof(MODULEINFO)); @@ -248,7 +248,7 @@ namespace Utils using ServerRankRevealAll = char(__cdecl*)(int*); - static auto fnServerRankRevealAll = PatternScan(GetModuleHandle("client.dll"), "55 8B EC 8B 0D ? ? ? ? 68"); + static auto fnServerRankRevealAll = PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 8B 0D ? ? ? ? 68"); int v[3] = { 0,0,0 }; @@ -260,7 +260,7 @@ namespace Utils FUNCTION_GUARD; using IsReadyFn = void(__cdecl*)(); - static auto fnIsReady = PatternScan(GetModuleHandle("client.dll"), "55 8B EC 83 E4 F8 83 EC 08 56 8B 35 ? ? ? ? 57 83 BE"); + static auto fnIsReady = PatternScan(GetModuleHandle("client_panorama.dll"), "55 8B EC 83 E4 F8 83 EC 08 56 8B 35 ? ? ? ? 57 83 BE"); reinterpret_cast(fnIsReady)(); } diff --git a/interfaces/IVEngineClient.hpp b/interfaces/IVEngineClient.hpp index ec11b08..a59e49a 100644 --- a/interfaces/IVEngineClient.hpp +++ b/interfaces/IVEngineClient.hpp @@ -159,6 +159,7 @@ class IVEngineClient virtual bool IsPaused(void) = 0; // 90 virtual float GetTimescale(void) const = 0; virtual bool IsTakingScreenshot(void) = 0; + virtual void Unknown_0(void) = 0; virtual bool IsHLTV(void) = 0; virtual bool IsLevelMainMenuBackground(void) = 0; virtual void GetMainMenuBackgroundName(char *dest, int destlen) = 0;