Compare commits

...

9 Commits

Author SHA1 Message Date
renovate[bot]
6fe5aed036
Merge 8e7b7c0087 into ce3aceae7a 2025-10-22 19:50:21 -05:00
Ryan Stecker
ce3aceae7a
Merge pull request #21 from A1mDev/master
Some checks are pending
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (clang, clang++, ubuntu-latest) (push) Waiting to run
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (clang-10, clang++-10, ubuntu-20.04) (push) Waiting to run
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (msvc, windows-2019) (push) Waiting to run
Extension builder / ${{ matrix.os }} - ${{ matrix.cc }} (msvc, windows-latest) (push) Waiting to run
Add platform-specific DETOUR macros
2025-10-22 19:35:44 -05:00
A1mDev
60d6307ac6 Bump version 2025-10-23 07:28:38 +07:00
A1mDev
6cf4b973b5 Add platform-specific DETOUR macros for TF2 (Linux i386) and CSGO (Windows)
This PR introduces a new macro, DETOUR_CUSTOM_STATIC2, to unify detour declarations
across different platforms and Source Engine versions, improving code readability.

- Linux i386 (TF2) → uses __attribute__((regparm(2)))
- Windows (CSGO) → uses __fastcall
- All other platforms → falls back to standard DETOUR_DECL_STATIC2

By consolidating detour declarations into a single macro, code is easier to read,
maintain, and less error-prone across different platforms and ABIs.
2025-10-23 07:26:03 +07:00
Ryan Stecker
2a074a30f2
Merge pull request #19 from voided/renovate/actions-setup-python-6.x
Update actions/setup-python action to v6
2025-10-22 18:37:49 -05:00
renovate[bot]
8d92438910
Update actions/setup-python action to v6 2025-10-22 22:55:44 +00:00
renovate[bot]
8e7b7c0087
Update dependency python to 3.14 2025-10-22 22:55:40 +00:00
Ryan Stecker
b40463327b
Merge pull request #18 from voided/renovate/actions-checkout-5.x
Update actions/checkout action to v5
2025-10-22 17:53:15 -05:00
renovate[bot]
15c3fc4387
Update actions/checkout action to v5 2025-08-11 14:41:28 +00:00
5 changed files with 24 additions and 13 deletions

View File

@ -53,16 +53,16 @@ jobs:
libc6-dev libc6-dev-i386 linux-libc-dev \
linux-libc-dev:i386 lib32z1-dev ${{ matrix.cc }}
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
name: Setup Python 3.9
with:
python-version: 3.9
python-version: 3.14
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- uses: actions/checkout@v4
- uses: actions/checkout@v5
name: Repository checkout
with:
fetch-depth: 0

View File

@ -1 +1 @@
1.3.0
1.3.1

View File

@ -39,13 +39,8 @@ IForward *g_pPassFwd = NULL;
int gSetCollisionSolverHookId, gShouldCollideHookId;
#if defined(__linux__) && defined(__i386__)
CDetour* PassServerEntityFilterFuncDetour;
__attribute__((regparm(2))) bool (*PassServerEntityFilterFunc_Actual)(const IHandleEntity*, const IHandleEntity*);
__attribute__((regparm(2))) bool PassServerEntityFilterFunc(const IHandleEntity* pTouch, const IHandleEntity* pPass)
#else
DETOUR_DECL_STATIC2( PassServerEntityFilterFunc, bool, const IHandleEntity *, pTouch, const IHandleEntity *, pPass )
#endif
DETOUR_CUSTOM_STATIC2( PassServerEntityFilterFunc, bool, const IHandleEntity *, pTouch, const IHandleEntity *, pPass )
{
if ( g_pPassFwd->GetFunctionCount() == 0 )
return DETOUR_STATIC_CALL( PassServerEntityFilterFunc )( pTouch, pPass );

View File

@ -107,5 +107,21 @@ inline const CBaseEntity *UTIL_EntityFromEntityHandle( const IHandleEntity *pCon
return pUnk->GetBaseEntity();
}
#define DETOUR_DECL_STATIC2_REGPARM(name, ret, p1type, p1name, p2type, p2name) \
ret (*name##_Actual)(p1type, p2type) __attribute__((regparm(2))) = NULL; \
ret name(p1type p1name, p2type p2name) __attribute__((regparm(2)))
#define DETOUR_DECL_STATIC2_FASTCALL(name, ret, p1type, p1name, p2type, p2name) \
ret (__fastcall *name##_Actual)(p1type, p2type) = NULL; \
ret __fastcall name(p1type p1name, p2type p2name)
#if SOURCE_ENGINE == SE_TF2 && defined(PLATFORM_LINUX) && defined(__i386__)
#define DETOUR_CUSTOM_STATIC2 DETOUR_DECL_STATIC2_REGPARM
#elif SOURCE_ENGINE == SE_CSGO && defined(PLATFORM_WINDOWS)
#define DETOUR_CUSTOM_STATIC2 DETOUR_DECL_STATIC2_FASTCALL
#else
#define DETOUR_CUSTOM_STATIC2 DETOUR_DECL_STATIC2
#endif
#endif // _INCLUDE_COLLISIONHOOK_EXTENSION_H_

View File

@ -18,9 +18,9 @@
#define SM_BUILD_TAG "-manual"
#define SM_BUILD_UNIQUEID "[MANUAL BUILD]"
#define SM_VERSION "1.3.0"
#define SM_VERSION "1.3.1"
#define SM_FULL_VERSION SM_VERSION SM_BUILD_TAG
#define SM_FILE_VERSION 1,3,0,0
#define SM_FILE_VERSION 1,3,1,0
#endif