Compare commits

..

2 commits
v1.13 ... main

Author SHA1 Message Date
Vauff
4ea3794248 Update Linux patch for 2026-09-22 CS2 update 2026-09-24 13:16:53 -04:00
Vauff
b418365b5b Migrate to KHook 2026-09-08 17:02:27 -04:00
3 changed files with 6 additions and 6 deletions

View file

@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@v7
with:
repository: alliedmodders/metamod-source
ref: 7ec0f16948ab3a0910a98b4ac10e1c0e360d5339
ref: master
path: mmsource-2.0
submodules: recursive

2
AMBuildScript generated
View file

@ -278,7 +278,7 @@ class MMSPluginConfig(object):
cxx.cxxincludes += [
os.path.join(context.currentSourcePath),
os.path.join(mms_core_path),
os.path.join(mms_core_path, 'sourcehook'),
os.path.join(self.mms_root, 'third_party', 'khook', 'include'),
]
defines = []

View file

@ -19,7 +19,7 @@
#include <stdio.h>
#include "MovementUnlocker.h"
#include <sh_memory.h>
#include "khook/memory.hpp"
#ifdef _WIN32
#include <Windows.h>
#elif __linux__
@ -110,7 +110,7 @@ bool MovementUnlocker::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxl
return false;
}
SourceHook::SetMemAccess((void*)pPatchAddress, PatchLen, SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC);
KHook::Memory::SetAccess((void*)pPatchAddress, PatchLen, KHook::Memory::READ | KHook::Memory::WRITE | KHook::Memory::EXECUTE);
#ifdef _WIN32
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];
#endif
SourceHook::SetMemAccess((void*)pPatchAddress, PatchLen, SH_MEM_READ | SH_MEM_EXEC);
KHook::Memory::SetAccess((void*)pPatchAddress, PatchLen, KHook::Memory::READ | KHook::Memory::EXECUTE);
META_CONPRINTF( "[Movement Unlocker] Successfully patched Movement Unlocker!\n" );
return true;
@ -154,7 +154,7 @@ const char *MovementUnlocker::GetLicense()
const char *MovementUnlocker::GetVersion()
{
return "1.13";
return "2.0.1";
}
const char *MovementUnlocker::GetDate()