mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-11 09:48:08 +08:00
fix(byte_patches): rewrite byte patches to ensure clang support
This commit is contained in:
1 parent
512085a941
commit
0a793a6b2e
10 files changed
+136
-120
No files matched your search
@@ -167,17 +167,17 @@ namespace YimMenu
|
||||
|
||||
constexpr auto spectatePatchPtrn = Pattern<"74 26 66 83 FF 0D 77 20 0F B7 C7">("SpectatePatch");
|
||||
scanner.Add(spectatePatchPtrn, [this](PointerCalculator ptr) {
|
||||
SpectatePatch = BytePatch::Make(ptr.As<std::uint8_t*>(), 0xEB).get();
|
||||
SpectatePatch = BytePatches::Add(ptr.As<std::uint8_t*>(), 0xEB);
|
||||
});
|
||||
|
||||
constexpr auto modelSpawnBypassPtrn = Pattern<"E8 ? ? ? ? 48 8B 78 48">("ModelSpawnBypass");
|
||||
scanner.Add(modelSpawnBypassPtrn, [this](PointerCalculator ptr) {
|
||||
BytePatch::Make(ptr.Add(1).Rip().Add(0x2B).As<std::uint8_t*>(), 0xEB)->Apply();
|
||||
});//Maybe it would be better to use this?
|
||||
ModelSpawnBypass = BytePatches::Add(ptr.Add(1).Rip().Add(0x2B).As<std::uint8_t*>(), 0xEB);
|
||||
});
|
||||
|
||||
constexpr auto worldModelSpawnBypassPtrn = Pattern<"4C 8B 2C 01 4D 85 ED 0F 84 ? ? ? ?">("WorldModelSpawnBypass");
|
||||
scanner.Add(worldModelSpawnBypassPtrn, [this](PointerCalculator ptr) {
|
||||
WorldModelSpawnBypass = BytePatch::Make(ptr.Add(4).As<PVOID>(), std::vector<byte>{0xEB, 0x12, 0x90}).get();
|
||||
WorldModelSpawnBypass = BytePatches::Add(ptr.Add(4).As<void*>(), std::vector<std::uint8_t>{0xEB, 0x12, 0x90});
|
||||
});
|
||||
|
||||
constexpr auto receiveNetMessagePtrn = Pattern<"48 81 C1 00 03 00 00 4C 89 E2">("ReceiveNetMessage");
|
||||
|
||||
Reference in new issue
Block a user