mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
fix some versions
fixed s18 (I think), did something to teams, reverted harvesting thing because it was buggy
This commit is contained in:
@@ -367,7 +367,14 @@ namespace Hooking
|
||||
static inline void ChangeBytesThing(uint8_t* instrAddr, uint8_t* DetourAddr, int Offset)
|
||||
{
|
||||
int64_t delta = DetourAddr - (instrAddr + Offset + 4);
|
||||
*(int32_t*)(instrAddr + Offset) = static_cast<int32_t>(delta);
|
||||
auto addr = (int32_t*)(instrAddr + Offset);
|
||||
DWORD dwProtection;
|
||||
VirtualProtect((PVOID)addr, 4, PAGE_EXECUTE_READWRITE, &dwProtection);
|
||||
|
||||
*addr = static_cast<int32_t>(delta);
|
||||
|
||||
DWORD dwTemp;
|
||||
VirtualProtect((PVOID)addr, 1, dwProtection, &dwTemp);
|
||||
}
|
||||
|
||||
enum ERelativeOffsets
|
||||
|
||||
Reference in New Issue
Block a user