From b516a1096b8e2a301ea611852eda94d690d2cfe3 Mon Sep 17 00:00:00 2001 From: TheSynx <87203897+Synx173@users.noreply.github.com> Date: Mon, 16 Aug 2021 05:41:56 -0400 Subject: [PATCH] Fix GameMode (#4414) * update ontick and actor * fix gamemode being scuffed * Fix how did this even compile --- Horion/Module/Modules/Jetpack.cpp | 7 +-- Memory/GameData.cpp | 14 ++--- Memory/Hooks.cpp | 94 +++++++++++++------------------ Memory/Hooks.h | 28 ++++----- SDK/CEntity.h | 6 +- 5 files changed, 66 insertions(+), 83 deletions(-) diff --git a/Horion/Module/Modules/Jetpack.cpp b/Horion/Module/Modules/Jetpack.cpp index 0c3a69b17..056d555b7 100644 --- a/Horion/Module/Modules/Jetpack.cpp +++ b/Horion/Module/Modules/Jetpack.cpp @@ -1,4 +1,5 @@ #include "Jetpack.h" + #include "../../../Utils/Logger.h" Jetpack::Jetpack() : IModule('F', Category::MOVEMENT, "Fly around like you had a Jetpack!") { @@ -18,7 +19,6 @@ const char* Jetpack::getModuleName() { } void Jetpack::onTick(C_GameMode* gm) { - logF("hello"); float calcYaw = (gm->player->yaw + 90) * (PI / 180); float calcPitch = (gm->player->pitch) * -(PI / 180); @@ -27,8 +27,7 @@ void Jetpack::onTick(C_GameMode* gm) { moveVec.x = cos(calcYaw) * cos(calcPitch) * speedMod; moveVec.y = sin(calcPitch) * speedMod; moveVec.z = sin(calcYaw) * cos(calcPitch) * speedMod; - - __debugbreak(); + gm->player->lerpMotion(moveVec); } else { delay++; @@ -59,4 +58,4 @@ void Jetpack::onTick(C_GameMode* gm) { delay = 0; } } -} +} \ No newline at end of file diff --git a/Memory/GameData.cpp b/Memory/GameData.cpp index 359df0929..a76e6ff5d 100644 --- a/Memory/GameData.cpp +++ b/Memory/GameData.cpp @@ -1,6 +1,7 @@ #include "GameData.h" #include + #include "../Utils/Logger.h" #include "../Utils/Utils.h" @@ -92,7 +93,6 @@ void GameData::hide() { } void GameData::updateGameData(C_GameMode* gameMode) { - retrieveClientInstance(); g_Data.localPlayer = g_Data.getLocalPlayer(); @@ -102,11 +102,9 @@ void GameData::updateGameData(C_GameMode* gameMode) { if (g_Data.localPlayer != nullptr) { C_GuiData* guiData = g_Data.clientInstance->getGuiData(); - - + if (guiData != nullptr) { { - logF("we out hjere"); auto vecLock = Logger::GetTextToPrintLock(); auto* stringPrintVector = Logger::GetTextToPrint(); #ifdef _DEBUG @@ -114,7 +112,7 @@ void GameData::updateGameData(C_GameMode* gameMode) { std::vector::iterator it; for (it = stringPrintVector->begin(); it != stringPrintVector->end(); ++it) { numPrinted++; - if(numPrinted > 20){ + if (numPrinted > 20) { break; } @@ -133,7 +131,7 @@ void GameData::updateGameData(C_GameMode* gameMode) { std::vector::iterator it; for (it = stringPrintVector.begin(); it != stringPrintVector.end(); ++it) { numPrinted++; - if(numPrinted > 20){ + if (numPrinted > 20) { break; } @@ -223,7 +221,7 @@ void GameData::initGameData(const SlimUtils::SlimModule* gameModule, SlimUtils:: logF("base: %llX", g_Data.getModule()->ptrBase); logF("clientInstance %llX", g_Data.clientInstance); logF("localPlayer %llX", g_Data.getLocalPlayer()); - if (g_Data.clientInstance != nullptr){ + if (g_Data.clientInstance != nullptr) { logF("minecraftGame: %llX", g_Data.clientInstance->minecraftGame); logF("levelRenderer: %llX", g_Data.clientInstance->levelRenderer); } @@ -257,4 +255,4 @@ void GameData::log(const char* fmt, ...) { std::string msg(message); g_Data.textPrintList.push_back(msg); va_end(arg); -} +} \ No newline at end of file diff --git a/Memory/Hooks.cpp b/Memory/Hooks.cpp index 835a77168..85216d710 100644 --- a/Memory/Hooks.cpp +++ b/Memory/Hooks.cpp @@ -1,16 +1,14 @@ #include "Hooks.h" -#include "../SDK/Tag.h" - #include - +#include +#include +#include // perspective, translate, rotate +#include #include // mat4 #include //radians -#include // perspective, translate, rotate -#include -#include -#include +#include "../SDK/Tag.h" Hooks g_Hooks; bool isTicked = false; @@ -34,7 +32,7 @@ void Hooks::Init() { g_Hooks.GameMode_startDestroyBlockHook = std::make_unique(gameModeVtable[1], Hooks::GameMode_startDestroyBlock); g_Hooks.GameMode_getPickRangeHook = std::make_unique(gameModeVtable[10], Hooks::GameMode_getPickRange); - + g_Hooks.GameMode_attackHook = std::make_unique(gameModeVtable[14], Hooks::GameMode_attack); } } @@ -85,7 +83,7 @@ void Hooks::Init() { uintptr_t sigOffset = FindSignature("48 8D 05 ?? ?? ?? ?? 49 89 06 49 8D 76 50"); int offset = *reinterpret_cast(sigOffset + 3); uintptr_t** directoryPackVtable = reinterpret_cast(sigOffset + offset + 7); - + { g_Hooks.DirectoryPackAccessStrategy__isTrustedHook = std::make_unique(directoryPackVtable[6], Hooks::DirectoryPackAccessStrategy__isTrusted); } @@ -93,11 +91,11 @@ void Hooks::Init() { uintptr_t sigOffset2 = FindSignature("48 8D 05 ?? ?? ?? ?? 48 89 03 49 8D 57"); int offset2 = *reinterpret_cast(sigOffset2 + 3); uintptr_t** directoryPackVtable2 = reinterpret_cast(sigOffset2 + offset2 + 7); - + { g_Hooks.ZipPackAccessStrategy__isTrustedHook = std::make_unique(directoryPackVtable2[6], Hooks::ReturnTrue); } - g_Hooks.SkinRepository___checkSignatureFileInPack = std::make_unique(FindSignature("48 89 5C 24 ? 57 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 44 24 ? 48 8B 39 48 8B 59 ? 48 85 DB"), Hooks::ReturnTrue); + g_Hooks.SkinRepository___checkSignatureFileInPack = std::make_unique(FindSignature("48 89 5C 24 ? 57 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 44 24 ? 48 8B 39 48 8B 59 ? 48 85 DB"), Hooks::ReturnTrue); } } @@ -112,7 +110,6 @@ void Hooks::Init() { D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_11_0 }; - DXGI_SWAP_CHAIN_DESC sd; { ZeroMemory(&sd, sizeof(sd)); @@ -130,7 +127,7 @@ void Hooks::Init() { sd.Windowed = TRUE; sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; } - + IDXGISwapChain* pSwapChain; const auto hr11 = static_castRelease(); }* - + uintptr_t sigOffset = FindSignature("48 8B 0D ?? ?? ?? ?? 48 8B 91 ?? ?? ?? ?? E8"); if (sigOffset != 0x0) { int startOffsetOffset = *reinterpret_cast((sigOffset + 3)); - uintptr_t startOffset = sigOffset + startOffsetOffset + /*length of instruction/ 7; + uintptr_t startOffset = sigOffset + startOffsetOffset + /*length of instruction/ 7; size_t secondOffset = (size_t) *reinterpret_cast((sigOffset + 10)); auto swapChain = g_Data.getSlimMem()->ReadPtr<__int64>(startOffset, {0, secondOffset, 0x170}); auto vtable = *reinterpret_cast(swapChain); @@ -208,10 +205,10 @@ void Hooks::Init() { void* lerpFunc = reinterpret_cast(FindSignature("8B 02 89 81 ? ? ? ? 8B 42 ? 89 81 ? ? ? ? 8B 42 ? 89 81 ? ? ? ? C3 CC CC CC CC CC 48 89 5C 24")); g_Hooks.Actor_lerpMotionHook = std::make_unique(lerpFunc, Hooks::Actor_lerpMotion); - + void* ascendLadder = reinterpret_cast(FindSignature("C7 81 ? ? ? ? ? ? ? ? C3 CC CC CC CC CC C7 81 ? ? ? ? ? ? ? ? C3 CC CC CC CC CC C7 81")); g_Hooks.Actor_ascendLadderHook = std::make_unique(ascendLadder, Hooks::Actor_ascendLadder); - + void* isInWater = reinterpret_cast(FindSignature("0F B6 81 ? ? ? ? C3 CC CC CC CC CC CC CC CC 0F B6 81 ? ? ? ? C3 CC CC CC CC CC CC CC CC 48 89 5C 24 ? 48 89 6C 24")); g_Hooks.Actor_isInWaterHook = std::make_unique(isInWater, Hooks::Actor_isInWater); @@ -263,10 +260,10 @@ void Hooks::Init() { void* _getSkinPack = reinterpret_cast(FindSignature("48 89 5C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? B8 ? ? ? ? E8 ? ? ? ? 48 2B E0 48 8B 05 ? ? ? ? 48 33 C4 48 89 85 ? ? ? ? 4C 8B E2 48 8B F1")); g_Hooks.SkinRepository___loadSkinPackHook = std::make_unique(_getSkinPack, Hooks::SkinRepository___loadSkinPack); - + void* _toStyledString = reinterpret_cast(FindSignature("48 89 5C 24 ? 48 89 74 24 ? 57 48 81 EC ? ? ? ? 49 8B D8 48 8B F9")); g_Hooks.toStyledStringHook = std::make_unique(_toStyledString, Hooks::toStyledString); - + void* InGamePlayScreen___renderLevel = reinterpret_cast(FindSignature("48 89 5C 24 20 55 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 ?? ?? ?? ?? 48 81 EC ?? ?? ?? ?? 0F 29 B4 24 ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 85 ?? ?? ?? ?? 49 8B D8 4C")); g_Hooks.InGamePlayScreen___renderLevelHook = std::make_unique(InGamePlayScreen___renderLevel, Hooks::InGamePlayScreen___renderLevel); @@ -274,7 +271,7 @@ void Hooks::Init() { void* addAction = reinterpret_cast(FindSignature("40 56 57 41 54 41 56 41 57 48 83 EC 30 48 C7 44 24 ? ? ? ? ? 48 89 5C 24 ? 48 89 6C 24 ? 45 0F B6 F8 4C 8B F2 48 8B F9 48 8B 01 48 8B 88 ? ? ? ?")); g_Hooks.InventoryTransactionManager__addActionHook = std::make_unique(addAction, Hooks::InventoryTransactionManager__addAction); #endif - + void* localPlayerUpdateFromCam = reinterpret_cast(FindSignature("48 89 5C 24 ?? 57 48 83 EC ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 44 24 ?? 80 BA")); g_Hooks.LocalPlayer__updateFromCameraHook = std::make_unique(localPlayerUpdateFromCam, Hooks::LocalPlayer__updateFromCamera); @@ -283,28 +280,28 @@ void Hooks::Init() { void* renderNameTags = reinterpret_cast(FindSignature("4C 8B DC 49 89 5B ? 55 56 57 41 54 41 55 41 56 41 57 48 81 EC ? ? ? ? 41 0F 29 73 ? 41 0F 29 7B ? 45 0F 29 43 ? 48 8B 05")); g_Hooks.LevelRendererPlayer__renderNameTagsHook = std::make_unique(renderNameTags, Hooks::LevelRendererPlayer__renderNameTags); - + static constexpr auto counterStart = __COUNTER__ + 1; #define lambda_counter (__COUNTER__ - counterStart) - + void* levelRendererBobView = reinterpret_cast(FindSignature("48 89 5C 24 ?? 57 48 81 EC ?? ?? ?? ?? 48 8B D9 0F 29 B4 24 ?? ?? ?? ?? 48 8B 89")); static auto bobViewHookF = [](__int64 _this, glm::mat4& matrix, float lerpT){ static auto origFunc = g_Hooks.lambdaHooks.at(lambda_counter)->GetFastcall(); - + /*auto p = g_Data.getLocalPlayer(); float degrees = fmodf(p->getPosOld()->lerp(p->getPos(), lerpT).x, 5) - 2.5f; degrees *= 180 / 2.5f; auto pos = g_Data.getClientInstance()->levelRenderer->origin; - + glm::mat4 View = matrix; - + matrix = View; //matrix = glm::rotate(matrix, glm::radians(degrees), glm::vec3(0, 0, 1));*/ return origFunc(_this, matrix, lerpT); }; - + std::shared_ptr bobViewHook = std::make_shared(levelRendererBobView, (decltype(&bobViewHookF.operator()))bobViewHookF); g_Hooks.lambdaHooks.push_back(bobViewHook); @@ -325,17 +322,15 @@ void Hooks::Restore() { void Hooks::Enable() { logF("Hooks enabled"); MH_EnableHook(MH_ALL_HOOKS); - } void* Hooks::Player_tickWorld(C_Player* _this, __int64 unk) { static auto oTick = g_Hooks.Player_tickWorldHook->GetFastcall(); auto o = oTick(_this, unk); - - if (_this == g_Data.getLocalPlayer()){ - // scuffed + + if (_this == g_Data.getLocalPlayer()) { // TODO: refactor all modules to not use GameMode - C_GameMode* gm = *reinterpret_cast(reinterpret_cast<__int64>(_this) + 4656); + C_GameMode* gm = *reinterpret_cast(reinterpret_cast<__int64>(_this) + 4840); GameData::updateGameData(gm); moduleMgr->onTick(gm); } @@ -403,7 +398,7 @@ __int64 Hooks::UIScene_render(C_UIScene* uiscene, __int64 screencontext) { if (alloc.getTextLength() < 100) { strcpy_s(g_Hooks.currentScreenName, alloc.getText()); } - + if (!g_Hooks.shouldRender) { g_Hooks.shouldRender = alwaysRender || (strcmp(alloc.getText(), "start_screen") == 0 || (alloc.getTextLength() >= 11 && strncmp(alloc.getText(), "play_screen", 11)) == 0); } @@ -429,7 +424,6 @@ __int64 Hooks::RenderText(__int64 a1, C_MinecraftUIRenderContext* renderCtx) { } static bool hasSentWarning = false; if (!g_Data.isInjectorConnectionActive() && !hasSentWarning) { - __int64 retval = oText(a1, renderCtx); LARGE_INTEGER end, elapsed; @@ -455,7 +449,7 @@ __int64 Hooks::RenderText(__int64 a1, C_MinecraftUIRenderContext* renderCtx) { DrawUtils::flush();*/ } - if(!hasSentWarning) // Wait for injector, it might connect in time + if (!hasSentWarning) // Wait for injector, it might connect in time return retval; } else wasConnectedBefore = true; @@ -623,7 +617,6 @@ __int64 Hooks::RenderText(__int64 a1, C_MinecraftUIRenderContext* renderCtx) { g_Data.sendPacketToInjector(packet); } } - } else { shouldRenderTabGui = hudModule->tabgui && hudModule->isEnabled(); shouldRenderArrayList = hudModule->arraylist && hudModule->isEnabled(); @@ -684,7 +677,6 @@ __int64 Hooks::RenderText(__int64 a1, C_MinecraftUIRenderContext* renderCtx) { // Draw ArrayList if (moduleMgr->isInitialized() && shouldRenderArrayList) { - // Parameters float textSize = hudModule->scale; float textPadding = 1.0f * textSize; @@ -970,12 +962,12 @@ void Hooks::Actor_lerpMotion(C_Entity* _this, vec3_t motVec) { if (!networkSender) { networkSender = reinterpret_cast(3 + FindSignature("FF 50 ? 41 80 BE ? ? ? ? ? 0F 85 ? ? ? ? EB 76")); } - + if (networkSender == _ReturnAddress()) { motVec = _this->velocity.lerp(motVec, noKnockbackmod->xModifier, noKnockbackmod->yModifier, noKnockbackmod->xModifier); } } - + oLerp(_this, motVec); } @@ -1150,11 +1142,11 @@ void Hooks::LoopbackPacketSender_sendToServer(C_LoopbackPacketSender* a, C_Packe if (autoSneakMod->isEnabled() && g_Data.getLocalPlayer() != nullptr && autoSneakMod->doSilent && packet->isInstanceOf()) { auto* pp = reinterpret_cast(packet); - - if (pp->action == 12 && pp->entityRuntimeId == g_Data.getLocalPlayer()->entityRuntimeId) - return; //dont send uncrouch + + if (pp->action == 12 && pp->entityRuntimeId == g_Data.getLocalPlayer()->entityRuntimeId) + return; //dont send uncrouch } - + moduleMgr->onSendPacket(packet); if (strcmp(packet->getName()->getText(), "EmotePacket") == 0) { @@ -1357,7 +1349,7 @@ __int64 Hooks::ChestScreenController_tick(C_ChestScreenController* a1) { static auto oFunc = g_Hooks.ChestScreenController_tickHook->GetFastcall<__int64, C_ChestScreenController*>(); static auto chestStealerMod = moduleMgr->getModule(); - if(chestStealerMod->isEnabled()) chestStealerMod->chestScreenController_tick(a1); + if (chestStealerMod->isEnabled()) chestStealerMod->chestScreenController_tick(a1); return oFunc(a1); } @@ -1554,7 +1546,7 @@ __int64 Hooks::PaintingRenderer__render(__int64 _this, __int64 a2, __int64 a3) { if (NoPaintingCrashMod->isEnabled()) return 0; - return Func(_this,a2,a3); + return Func(_this, a2, a3); } bool Hooks::DirectoryPackAccessStrategy__isTrusted(__int64 _this) { @@ -1567,7 +1559,7 @@ bool Hooks::DirectoryPackAccessStrategy__isTrusted(__int64 _this) { int offset = *reinterpret_cast(sigOffset + 3); directoryPackAccessStrategyVtable = reinterpret_cast(sigOffset + offset + 7); } - + if (*reinterpret_cast(_this) == (uintptr_t)directoryPackAccessStrategyVtable) return true; @@ -1742,7 +1734,6 @@ HRESULT Hooks::swapChain__present(IDXGISwapChain* chain, UINT syncInterval, UINT _D3DVECTOR4 color; }; - static bool init = false; static ID3D11Device* device; static ID3D11DeviceContext* context; @@ -1766,7 +1757,6 @@ HRESULT Hooks::swapChain__present(IDXGISwapChain* chain, UINT syncInterval, UINT {"POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, {"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0} }; - bufferDesc.Usage = D3D11_USAGE_DYNAMIC; bufferDesc.ByteWidth = 50 * sizeof(VertexType); @@ -1869,7 +1859,6 @@ HRESULT Hooks::swapChain__present(IDXGISwapChain* chain, UINT syncInterval, UINT result = device->CreateBuffer(&indexBufferDesc, &indexData, &indexBuffer); if (FAILED(result)) { logF("CreateBuffer2 %llX", result); - } } @@ -1877,7 +1866,7 @@ HRESULT Hooks::swapChain__present(IDXGISwapChain* chain, UINT syncInterval, UINT } /* - + ImGui_ImplDX11_NewFrame(); ImGui_ImplWin32_NewFrame(); @@ -1889,7 +1878,6 @@ HRESULT Hooks::swapChain__present(IDXGISwapChain* chain, UINT syncInterval, UINT ImGui::NewFrame(); - ImGui::Begin("bean"); ImGui::Text("Hello"); @@ -1931,7 +1919,7 @@ HRESULT Hooks::swapChain__present(IDXGISwapChain* chain, UINT syncInterval, UINT context->IASetIndexBuffer(indexBuffer, DXGI_FORMAT_R32_UINT, 0); context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); context->IASetInputLayout(m_pInputLayout); - + context->DrawIndexed(3, 0, 0); #endif @@ -1967,7 +1955,6 @@ __int64 Hooks::Cube__compile(__int64 a1, __int64 a2) { auto it = *reinterpret_cast<__int64*>(a1 + 0x30); auto boi = it + 0x1C; while (it != end) { // loop through PolygonQuad - if (it != boi + 0x34) { auto iter2 = boi - 0xC; do { @@ -1975,7 +1962,6 @@ __int64 Hooks::Cube__compile(__int64 a1, __int64 a2) { float* floatyBoi = reinterpret_cast(iter2 - 16); logF("%.1f %.1f %.1f", floatyBoi[0], floatyBoi[1], floatyBoi[2]); iter2 += 0x14; - } while (iter2 - 0x10 != boi + 0x34); } boi += 0x50; @@ -2074,4 +2060,4 @@ void Hooks::LevelRendererPlayer__renderNameTags(__int64 a1, __int64 a2, TextHold } return func(a1, a2, a3, a4); -} +} \ No newline at end of file diff --git a/Memory/Hooks.h b/Memory/Hooks.h index be88e1196..4da29c2f9 100644 --- a/Memory/Hooks.h +++ b/Memory/Hooks.h @@ -12,6 +12,7 @@ #include "../Horion/Menu/TabGui.h" #include "../Horion/Module/ModuleManager.h" #include "../SDK/CBlockLegacy.h" +#include "../SDK/CCamera.h" #include "../SDK/CChestBlockActor.h" #include "../SDK/CGameMode.h" #include "../SDK/CMinecraftUIRenderContext.h" @@ -19,19 +20,19 @@ #include "../SDK/CRakNetInstance.h" #include "../SDK/CUIScene.h" #include "../SDK/TextHolder.h" -#include "../SDK/CCamera.h" -#include "../Utils/TextFormat.h" #include "../Utils/SkinUtil.h" +#include "../Utils/TextFormat.h" #include "../resource.h" #include "GameData.h" #include "MinHook.h" //#include "../Horion/Game/Game.h" -#include -#include -#include #include #include +#include +#include + +#include #include "../include/d3dx11async.h" @@ -42,12 +43,12 @@ struct CoolSkinData { TextHolder unknown; TextHolder unknown2; TextHolder skinResourcePatch; // 0x040 - TextHolder geometryName; // 0x060 "geometry.humanoid.custom" + TextHolder geometryName; // 0x060 "geometry.humanoid.custom" unsigned char gap2[0x40]; // 0x080 void* startAnimatedFrames; // 0x0C0 void* endAnimatedFrames; // 0x0C8 - unsigned char gap3[0x8]; // 0x0D0 - TextHolder geometryData; // 0x0D8 + unsigned char gap3[0x8]; // 0x0D0 + TextHolder geometryData; // 0x0D8 TextHolder skinAnimationData; // 0x0F8 unsigned char gap4[0x20]; // 0x118 bool isPremiumSkin; // 0x138 @@ -65,7 +66,7 @@ class Hooks { private: bool shouldRender = true; char currentScreenName[100]; - + public: std::vector> lambdaHooks; @@ -117,12 +118,12 @@ class Hooks { static __int64 prepFeaturedServersFirstTime(__int64 a1, __int64 a2); static HRESULT swapChain__present(IDXGISwapChain* chain, UINT syncInterval, UINT flags); static __int64 InGamePlayScreen___renderLevel(__int64 playScreen, __int64 a2, __int64 a3); - static HRESULT swapChain__ResizeBuffers(IDXGISwapChain* chain, UINT bufferCount, UINT Width, UINT Height,DXGI_FORMAT Newformat,UINT SwapChainFlags); + static HRESULT swapChain__ResizeBuffers(IDXGISwapChain* chain, UINT bufferCount, UINT Width, UINT Height, DXGI_FORMAT Newformat, UINT SwapChainFlags); static __int64 Cube__compile(__int64 a1, __int64 a2); static void LocalPlayer__updateFromCamera(__int64 a1, C_Camera* a2); static bool Mob__isImmobile(C_Entity*); - static void InventoryTransactionManager__addAction(C_InventoryTransactionManager*, C_InventoryAction &); - static void LevelRendererPlayer__renderNameTags(__int64 a1, __int64 a2,TextHolder* name, __int64 a4); + static void InventoryTransactionManager__addAction(C_InventoryTransactionManager*, C_InventoryAction&); + static void LevelRendererPlayer__renderNameTags(__int64 a1, __int64 a2, TextHolder* name, __int64 a4); std::unique_ptr Player_tickWorldHook; std::unique_ptr ChatScreenController_sendChatMessageHook; @@ -206,9 +207,8 @@ class FuncHook { int ret = enable ? MH_EnableHook(funcPtr) : MH_DisableHook(funcPtr); if (ret != MH_OK) logF("MH_EnableHook = %i", ret); - }else + } else logF("enableHook() called with nullptr func!"); - } ~FuncHook() { diff --git a/SDK/CEntity.h b/SDK/CEntity.h index 554e42fd3..266716001 100644 --- a/SDK/CEntity.h +++ b/SDK/CEntity.h @@ -141,9 +141,9 @@ class C_Entity { public: virtual void setPos(vec3_t const &); - virtual bool filler(); + virtual bool filler(); virtual vec3_t *getPredictedMovementValues(void) const; - virtual vec3_t *getPos(void) const; // getStateVectorComponent + virtual vec3_t *getPos(void) const; // getStateVectorComponent virtual vec3_t *getPosOld(void) const; virtual vec3_t *getPosExtrapolated(float) const; @@ -225,7 +225,7 @@ class C_Entity { virtual bool isOverWater(void) const; private: - virtual __int64 setBlockMovementSlowdownMultiplier(vec3_t const&); + virtual __int64 setBlockMovementSlowdownMultiplier(vec3_t const &); virtual __int64 resetBlockMovementSlowdownMultiplier(); virtual __int64 getCameraOffset(void) const; virtual __int64 getShadowHeightOffs(void);