@@ -71,19 +71,19 @@ void Hooks::Init() {
7171 }
7272
7373 // MoveInputHandler::vtable
74- /* {
75- uintptr_t sigOffset = FindSignature("48 8D 05 ?? ?? ?? ?? 48 89 03 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 48 8B 42 ?? 48 85 C0 74 04 ");
74+ {
75+ uintptr_t sigOffset = FindSignature (" 48 8D 0D ? ? ? ? 49 89 48 ? 49 89 80 ? ? ? ? 49 89 80 ? ? ? ? 48 39 87 ? ? ? ? 74 20 48 8B 8F " );
7676 int offset = *reinterpret_cast <int *>(sigOffset + 3 );
7777 uintptr_t ** moveInputVtable = reinterpret_cast <uintptr_t **>(sigOffset + offset + 7 );
7878 if (moveInputVtable == 0x0 || sigOffset == 0x0 )
7979 logF (" C_GameMode signature not working!!!" );
8080 else {
8181 g_Hooks.MoveInputHandler_tickHook = std::make_unique<FuncHook>(moveInputVtable[1 ], Hooks::MoveInputHandler_tick);
8282 }
83- }*/
83+ }
8484
8585 // PackAccessStrategy vtables for isTrusted
86- /* {
86+ {
8787 uintptr_t sigOffset = FindSignature (" 48 8D 05 ?? ?? ?? ?? 49 89 06 49 8D 76 50" );
8888 int offset = *reinterpret_cast <int *>(sigOffset + 3 );
8989 uintptr_t ** directoryPackVtable = reinterpret_cast <uintptr_t **>(sigOffset + offset + 7 );
@@ -94,13 +94,13 @@ void Hooks::Init() {
9494
9595 uintptr_t sigOffset2 = FindSignature (" 48 8D 05 ?? ?? ?? ?? 48 89 03 49 8D 57" );
9696 int offset2 = *reinterpret_cast <int *>(sigOffset2 + 3 );
97- uintptr_t** directoryPackVtable2 = reinterpret_cast<uintptr_t**>(sigOffset2 + offset2 + / 7);
97+ uintptr_t ** directoryPackVtable2 = reinterpret_cast <uintptr_t **>(sigOffset2 + offset2 + 7 );
9898
9999 {
100100 g_Hooks.ZipPackAccessStrategy__isTrustedHook = std::make_unique<FuncHook>(directoryPackVtable2[6 ], Hooks::ReturnTrue);
101101 }
102102 g_Hooks.SkinRepository___checkSignatureFileInPack = std::make_unique<FuncHook>(FindSignature (" 40 57 48 81 EC ? ? ? ? 48 C7 44 24 ? ? ? ? ? 48 89 9C 24 ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 44 24 ? 48 8B 39 48 8B 59 ? 48 85 DB" ), Hooks::ReturnTrue);
103- }*/
103+ }
104104 }
105105
106106 // d3d11
@@ -257,7 +257,7 @@ void Hooks::Init() {
257257 void * PaintingRenderer__renderAddr = reinterpret_cast <void *>(FindSignature (" 48 8B C4 57 41 54 41 55 41 56 41 57 48 ?? ?? ?? ?? ?? ?? 48 ?? ?? ?? ?? ?? ?? ?? ?? 48 89 58 ?? 48 89 68 ?? 48 89 70 ?? 4D 8B F0 4C 8B FA 48 8B F1 B9 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??" ));
258258 g_Hooks.PaintingRenderer__renderHook = std::make_unique<FuncHook>(PaintingRenderer__renderAddr, Hooks::PaintingRenderer__render);
259259
260- void * _getSkinPack = reinterpret_cast <void *>(FindSignature (" 40 55 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? B8 ? ? ? ? E8 ? ? ? ? 48 2B E0 48 C7 85 ? ? ? ? ? ? ? ? 48 89 9C 24 ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 85 ? ? ? ? 48 8B F2 " ));
260+ void * _getSkinPack = reinterpret_cast <void *>(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 " ));
261261 g_Hooks.SkinRepository___loadSkinPackHook = std::make_unique<FuncHook>(_getSkinPack, Hooks::SkinRepository___loadSkinPack);
262262
263263 void * _toStyledString = reinterpret_cast <void *>(FindSignature (" 40 55 56 57 48 81 EC ?? ?? ?? ?? 48 C7 44 24 ?? FE FF FF FF 48 89 9C 24 ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 48 8B FA 48 8B D9 48 89 54 24 ?? 33 D2" ));
@@ -1210,7 +1210,7 @@ void Hooks::GameMode_startDestroyBlock(C_GameMode* _this, vec3_ti* a2, uint8_t f
12101210 const bool isAutoMode = nukerModule->isAutoMode ();
12111211
12121212 C_BlockSource* region = g_Data.getLocalPlayer ()->region ;
1213- int selectedBlockId = (* (region->getBlock (*a2)->blockLegacy ))->blockId ;
1213+ int selectedBlockId = ((region->getBlock (*a2)->blockLegacy ))->blockId ;
12141214 uint8_t selectedBlockData = region->getBlock (*a2)->data ;
12151215
12161216 if (!isAutoMode) {
@@ -1223,7 +1223,7 @@ void Hooks::GameMode_startDestroyBlock(C_GameMode* _this, vec3_ti* a2, uint8_t f
12231223 if (tempPos.y > 0 ) {
12241224 C_Block* blok = region->getBlock (tempPos);
12251225 uint8_t data = blok->data ;
1226- int id = (* (blok->blockLegacy ))->blockId ;
1226+ int id = ((blok->blockLegacy ))->blockId ;
12271227 if (id != 0 && (!isVeinMiner || (id == selectedBlockId && data == selectedBlockData)))
12281228 _this->destroyBlock (&tempPos, face);
12291229 }
0 commit comments