From 6dd1516d79a9def29caa3480b08cf058a6cbd6d5 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 4 Oct 2026 18:49:40 +0200 Subject: [PATCH] Revert "[saco] Match `RelocatePedsListHack` and `ApplyNewColStoreSizePatch`; both call `VirtualProtect` inline, the `UnFuck` helper in their place was wrong" This reverts commit 35e99d286f06fbb8f0b49f2109f324b236abeff3. --- saco/game/patches.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/saco/game/patches.cpp b/saco/game/patches.cpp index 644c653..ceb3e21 100644 --- a/saco/game/patches.cpp +++ b/saco/game/patches.cpp @@ -130,8 +130,7 @@ void ApplyNewColStoreSizePatch(DWORD dwCount) int x=0; while(x!=7) { - DWORD oldProt2; - VirtualProtect((PVOID)(dwPatchAddrColStoreSize[x] + 2),4,PAGE_EXECUTE_READWRITE,&oldProt2); + UnFuck(dwPatchAddrColStoreSize[x] + 2, 4); *(PDWORD)(dwPatchAddrColStoreSize[x] + 2) = 44 * dwCount; x++; } @@ -474,7 +473,6 @@ PED_MODEL PedModelsMemory[319]; void RelocatePedsListHack() { - DWORD oldProt; BYTE *aPedsListMemory = (BYTE*)&PedModelsMemory[0]; // Init the mem @@ -486,7 +484,7 @@ void RelocatePedsListHack() } // Patch the GetPedsModelInfo to use us // instead of the gta_sa.exe mem. - VirtualProtect((PVOID)0x4C67AD,4,PAGE_EXECUTE_READWRITE,&oldProt); + UnFuck(0x4C67AD,4); *(DWORD *)0x4C67AD = (DWORD)aPedsListMemory; }