Compare commits

..

10 commits
v1.6 ... 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
Vauff
6148f39ad3 Migrate to build containers & start SteamRT4 builds 2026-08-17 00:01:34 -04:00
Vauff
a2a78ed01b Update patches for 2026-05-18 CS2 update 2026-05-18 21:58:06 -04:00
Vauff
d08776f5cf Update patches for AnimGraph2 CS2 update 2026-04-21 17:11:36 -04:00
Vauff
221a9de3b2 Fix missing setuptools in Windows CI 2026-01-24 20:59:27 -05:00
Vauff
a2673ddd75 Update patches for 2026-01-21 CS2 update 2026-01-24 20:50:56 -05:00
Vauff
0193cd340a Update patches for 2025-11-04 CS2 update 2025-11-04 23:00:21 -05:00
Vauff
850d144232 Update Windows patch for 2025-09-25 CS2 update
Co-authored-by: xen <xen@momentum-mod.org>
2025-09-26 22:32:51 -04:00
Vauff
b5807e27cf Update patches for 2025-09-23 CS2 update 2025-09-24 00:05:15 -04:00
4 changed files with 41 additions and 30 deletions

View file

@ -4,26 +4,31 @@ on: [push, pull_request]
jobs:
build:
name: Build
name: ${{ matrix.name }} Build
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-latest]
include:
- os: windows-2022
- os: windows-latest
name: Windows
- os: ubuntu-latest
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
name: SteamRT3
container: ghcr.io/source2ze/build-containers:steamrt3
- os: ubuntu-latest
name: SteamRT4
container: ghcr.io/source2ze/build-containers:steamrt4
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
path: MovementUnlocker
submodules: recursive
fetch-depth: 0
- name: Checkout Metamod
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: alliedmodders/metamod-source
ref: master
@ -31,34 +36,35 @@ jobs:
submodules: recursive
- name: Checkout HL2SDK
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: alliedmodders/hl2sdk
ref: cs2
path: hl2sdk-cs2
- name: Checkout AMBuild
uses: actions/checkout@v4
if: matrix.os == 'windows-latest'
uses: actions/checkout@v7
with:
repository: alliedmodders/ambuild
path: ambuild
- name: Install AMBuild
run: |
cd ambuild && python setup.py install && cd ..
if: matrix.os == 'windows-latest'
run: pip install setuptools && cd ambuild && python setup.py install && cd ..
- name: Build
working-directory: MovementUnlocker
shell: bash
run: |
mkdir build && cd build
python ../configure.py --enable-optimize --symbol-files --sdks cs2
python ../configure.py --enable-optimize --sdks cs2
ambuild
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ runner.os }}
name: ${{ matrix.name }}
path: MovementUnlocker/build/package
release:
@ -69,15 +75,20 @@ jobs:
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
- name: Package
run: |
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
ls -Rall
if [ -d "./Linux/" ]; then
cd ./Linux/
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz *
if [ -d "./SteamRT3/" ]; then
cd ./SteamRT3/
tar -czf ../${{ github.event.repository.name }}-${version}-steamrt3.tar.gz *
cd -
fi
if [ -d "./SteamRT4/" ]; then
cd ./SteamRT4/
tar -czf ../${{ github.event.repository.name }}-${version}-steamrt4.tar.gz *
cd -
fi
if [ -d "./Windows/" ]; then

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__
@ -29,13 +29,13 @@
MovementUnlocker g_MovementUnlocker;
#ifdef _WIN32
const unsigned char *pPatchSignature = (unsigned char *)"\x0F\x86\xB8\x2A\x2A\x2A\xF3\x0F\x58\xD4";
const char *pPatchPattern = "xxx???xxxx";
const unsigned char *pPatchSignature = (unsigned char *)"\x0F\x86\xAF\x2A\x2A\x2A\x0F\x57\xC0\x0F\x2E\xC2";
const char *pPatchPattern = "xxx???xxxxxx";
int PatchLen = 6;
#elif __linux__
const unsigned char * pPatchSignature = (unsigned char *)"\x0F\x87\x2A\x2A\x2A\x2A\xF3\x0F\x10\x3D\x2A\x2A\x2A\x2A\xF3\x0F\x11\xBD";
const char* pPatchPattern = "xx????xxxx????xxxx";
int PatchLen = 6;
const unsigned char * pPatchSignature = (unsigned char *)"\x76\x2A\xF3\x0F\x51\xC0\xF3\x0F\x7E\xDB\x49\x8B\x06";
const char* pPatchPattern = "x?xxxxxxxxxxx";
int PatchLen = 1;
#endif
// From https://git.botox.bz/CSSZombieEscape/sm-ext-PhysHooks
@ -110,19 +110,19 @@ 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", "\xB9", "\x00", "\x00", "\x00", "\x90"};
const char* patchBytes[] = {"\xE9", "\xB0", "\x00", "\x00", "\x00", "\x90"};
for (int i = 0; i < PatchLen; i++)
*(unsigned char*)(pPatchAddress + i) = ((unsigned char*)patchBytes[i])[0];
#elif __linux__
for (int i = 0; i < PatchLen; i++)
*(unsigned char*)(pPatchAddress + i) = ((unsigned char*)"\x90")[0];
*(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.6";
return "2.0.1";
}
const char *MovementUnlocker::GetDate()

@ -1 +1 @@
Subproject commit a57b3095a6fc31a98b13e2d73ebb668dac4f1300
Subproject commit 20b3a014264b38908c4a5d4eb263ba2c488f3dc1