Skip to content

Commit 26dbe21

Browse files
committed
fixup: actually disable for INFRA
1 parent f7e68b2 commit 26dbe21

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/Modules/Client.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,20 +1031,19 @@ bool Client::Init() {
10311031
MatrixBuildRotationAboutAxis = (decltype(MatrixBuildRotationAboutAxis))Memory::Scan(client->Name(), Offsets::MatrixBuildRotationAboutAxis);
10321032
MatrixBuildRotationAboutAxisHook.SetFunc(MatrixBuildRotationAboutAxis, false); // only during ApplyMouse
10331033

1034-
auto drawPortalSpBranch = Memory::Scan(client->Name(), Offsets::DrawPortalSpBranch);
1035-
auto drawPortalGhostSpBranch = Memory::Scan(client->Name(), Offsets::DrawPortalGhostSpBranch);
1036-
10371034
Client::DrawPortal = (decltype(Client::DrawPortal))Memory::Scan(client->Name(), Offsets::DrawPortal);
10381035
g_DrawPortalGhost = (decltype(g_DrawPortalGhost))Memory::Scan(client->Name(), Offsets::DrawPortalGhost);
1036+
if (Client::DrawPortal && g_DrawPortalGhost) {
1037+
auto drawPortalSpBranch = Memory::Scan(client->Name(), Offsets::DrawPortalSpBranch);
1038+
auto drawPortalGhostSpBranch = Memory::Scan(client->Name(), Offsets::DrawPortalGhostSpBranch);
10391039

1040-
g_DrawPortalHook.SetFunc(Client::DrawPortal);
1041-
g_DrawPortalGhostHook.SetFunc(g_DrawPortalGhost);
1040+
g_DrawPortalHook.SetFunc(Client::DrawPortal);
1041+
g_DrawPortalGhostHook.SetFunc(g_DrawPortalGhost);
10421042

1043-
g_drawPortalPatch = new Memory::Patch();
1044-
g_drawPortalGhostPatch = new Memory::Patch();
1043+
g_drawPortalPatch = new Memory::Patch();
1044+
g_drawPortalGhostPatch = new Memory::Patch();
10451045

1046-
unsigned char drawPortalGhostByte = 0x80;
1047-
if (drawPortalSpBranch && drawPortalGhostSpBranch) {
1046+
unsigned char drawPortalGhostByte = 0x80;
10481047
#ifndef _WIN32
10491048
unsigned char drawPortalBytes[5];
10501049

src/Offsets/INFRA 6905.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ SIGSCAN_WINDOWS(SND_RecordBuffer, "55 8B EC 80 3D ? ? ? ? 00 56")
9595

9696
// Client
9797
SIGSCAN_WINDOWS(DrawTranslucentRenderables, "55 8B EC 81 EC 80 00 00 00 53 56 8B F1")
98+
SIGSCAN_WINDOWS(DrawPortal, "")
99+
SIGSCAN_WINDOWS(DrawPortalSpBranch, "")
100+
OFFSET_WINDOWS(DrawPortalSpBranchOff, -1)
98101
SIGSCAN_WINDOWS(DrawPortalGhost, "")
102+
SIGSCAN_WINDOWS(DrawPortalGhostSpBranch, "")
103+
99104
SIGSCAN_WINDOWS(DrawOpaqueRenderables, "55 8B EC 83 EC 54 A1 ? ? ? ? 83 7D ? 00")
100105
SIGSCAN_WINDOWS(GetHudSig, "55 8B EC 8B 45 ? 83 F8 FF 75 ? 8B 0D ? ? ? ? 8B 01 8B 90 ? ? ? ? FF D2 69 C0 84 00 00 00") // usage of FindElement -> probably previous function call
101106
SIGSCAN_WINDOWS(FindElementSig, "55 8B EC 53 8B 5D ? 56 57 8B F1 33 FF") // "[%d] Could not find Hud Element: %s\n" xref

0 commit comments

Comments
 (0)