Compare commits

..

2 commits
main ... v1.13

Author SHA1 Message Date
Vauff
15b3a88397 Pin Metamod to last SourceHook release 2026-09-24 13:18:36 -04:00
Vauff
2a19ec7a8b Update Linux patch for 2026-09-22 CS2 update 2026-09-24 13:17:57 -04:00
3 changed files with 6 additions and 6 deletions

View file

@ -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
View file

@ -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 = []

View file

@ -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()