mirror of
https://github.com/Source2ZE/MovementUnlocker.git
synced 2026-09-27 20:57:04 +02:00
Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15b3a88397 | ||
|
|
2a19ec7a8b |
3 changed files with 6 additions and 6 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
repository: alliedmodders/metamod-source
|
repository: alliedmodders/metamod-source
|
||||||
ref: master
|
ref: 7ec0f16948ab3a0910a98b4ac10e1c0e360d5339
|
||||||
path: mmsource-2.0
|
path: mmsource-2.0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
|
|
||||||
2
AMBuildScript
generated
2
AMBuildScript
generated
|
|
@ -278,7 +278,7 @@ class MMSPluginConfig(object):
|
||||||
cxx.cxxincludes += [
|
cxx.cxxincludes += [
|
||||||
os.path.join(context.currentSourcePath),
|
os.path.join(context.currentSourcePath),
|
||||||
os.path.join(mms_core_path),
|
os.path.join(mms_core_path),
|
||||||
os.path.join(self.mms_root, 'third_party', 'khook', 'include'),
|
os.path.join(mms_core_path, 'sourcehook'),
|
||||||
]
|
]
|
||||||
|
|
||||||
defines = []
|
defines = []
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "MovementUnlocker.h"
|
#include "MovementUnlocker.h"
|
||||||
#include "khook/memory.hpp"
|
#include <sh_memory.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#elif __linux__
|
#elif __linux__
|
||||||
|
|
@ -110,7 +110,7 @@ bool MovementUnlocker::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxl
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
KHook::Memory::SetAccess((void*)pPatchAddress, PatchLen, KHook::Memory::READ | KHook::Memory::WRITE | KHook::Memory::EXECUTE);
|
SourceHook::SetMemAccess((void*)pPatchAddress, PatchLen, SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
const char* patchBytes[] = {"\xE9", "\xB0", "\x00", "\x00", "\x00", "\x90"};
|
const char* patchBytes[] = {"\xE9", "\xB0", "\x00", "\x00", "\x00", "\x90"};
|
||||||
|
|
@ -122,7 +122,7 @@ bool MovementUnlocker::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxl
|
||||||
*(unsigned char*)(pPatchAddress + i) = ((unsigned char*)"\xEB")[0];
|
*(unsigned char*)(pPatchAddress + i) = ((unsigned char*)"\xEB")[0];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
KHook::Memory::SetAccess((void*)pPatchAddress, PatchLen, KHook::Memory::READ | KHook::Memory::EXECUTE);
|
SourceHook::SetMemAccess((void*)pPatchAddress, PatchLen, SH_MEM_READ | SH_MEM_EXEC);
|
||||||
META_CONPRINTF( "[Movement Unlocker] Successfully patched Movement Unlocker!\n" );
|
META_CONPRINTF( "[Movement Unlocker] Successfully patched Movement Unlocker!\n" );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -154,7 +154,7 @@ const char *MovementUnlocker::GetLicense()
|
||||||
|
|
||||||
const char *MovementUnlocker::GetVersion()
|
const char *MovementUnlocker::GetVersion()
|
||||||
{
|
{
|
||||||
return "2.0.1";
|
return "1.13";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *MovementUnlocker::GetDate()
|
const char *MovementUnlocker::GetDate()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue