Skip to content

Metamod API 18 + CS2 1.41.8.2: KHook port, CheckJumpButtonWater signature, Linux CI fixes - #8

Open
Sharpyku wants to merge 14 commits into
SharpTimer:mainfrom
Sharpyku:main
Open

Sharpyku wants to merge 14 commits into
SharpTimer:mainfrom
Sharpyku:main

Conversation

@Sharpyku

@Sharpyku Sharpyku commented Jul 10, 2026 •

Copy link
Copy Markdown

Updated 2026-09-28. This PR originally covered Season 5 (1.41.6.9); those commits are still included. It now also carries the Metamod API 18 port and the 1.41.8.2 signature fix, because without both the plugin cannot be loaded on a current server at all.

What

Two separate breaks, either of which is fatal on its own.

  1. Metamod:Source 2.0 dropped SourceHook (plugin API 18, git1469+). The old binary cannot be loaded by it. Ported to KHook: ClientActive, StartupServer, CTriggerGravity::Precache and CTriggerGravity::EndTouch now go through KHook::Virtual, the sdk submodule moves to alliedmodders/hl2sdk@dadd5d7, and the obsolete tier1.a is dropped from the link inputs.

    This port is @SudoGool's work, from Port STFixes to Metamod API 18 #9. It is merged here unchanged, with their Windows workflow intact, because Port STFixes to Metamod API 18 #9 and this PR cannot both apply cleanly and the two breaks need to ship together.

  2. CheckJumpButtonWater no longer resolves after the CS2 update of 2026-09-22 (PatchVersion 1.41.8.2, ServerVersion 2000914). It is the one lookup that aborts the whole plugin load, so while it is broken STFixes is simply absent — and with it BotNavIgnore, which is why looping replay bots stopped spawning on surf and bhop maps.

    Valve moved the addressing from [r13+disp32] to [r12+disp32], so 41 C7 85 became 41 C7 84 24 and each mov grew by a byte, knocking the old wildcard mask out of alignment.

    old: \xC8\x42\x41\xC7\x85\x2A*8\x41\xC7\x85\x2A*8\xE9
    new: \xC8\x42\x41\xC7\x84\x24\x2A*8\x41\xC7\x84\x24\x2A*8\xE9
    

    Linux only; the windows line is untouched.

Two CI fixes were needed on top of #9, which only added a Windows workflow and left the Linux job untouched:

  • core/ISmmPlugin.h includes khook.hpp as a sibling of itself, while Metamod ships KHook under third_party/khook/include. Without staging it into core/ the Linux build dies on the first translation unit with fatal error: 'khook.hpp' file not found.
  • actions/checkout does not resolve an abbreviated SHA. Given ref: 05c5c63 it fetches refs/heads/05c5c63*, matches nothing and fails. Metamod is now pinned by full SHA rather than tracking master, since the plugin ABI moves without notice.

Validation

  • Linux CI green.

  • All 29 linux signatures scanned against a live 1.41.8.2 libserver.so. Everything the plugin requires at load resolves single-match: the three RESOLVE_SIG entries, the three detours, and BotNavIgnore.

  • Known stale, none of them load-blocking: SetGroundEntity matches twice — that is upstream CS2Fixes' own signature and ianlucas/cs2-signatures tracks it as ambiguous too, it is not introduced here. ServerMovementUnlock does not resolve but is never looked up while cs2f_movement_unlocker_enable is 0. CEntityInstance_AcceptInput, CEntityIdentity_AcceptInput, CBaseEntity_TakeDamageOld, CNavMesh_GetNearestNavArea and CCSPlayer_WeaponServices_CanUse are stale and unreferenced by any code in this repo.

  • Running on three production Linux servers (two surf, one bhop, steamrt containers) with no crashes, alongside Vauff's Movement Unlocker and GameFixes_mm. Startup log:

    [CS2Fixes] Patched FixWaterFloorJump at 0x...
    [CS2Fixes] Patched BotNavIgnore at 0x...
    [CS2Fixes] Detoured TriggerPush_Touch / CTriggerGravity_GravityTouch / ProcessUsercmds
    [CS2Fixes] All KHook hooks started!
    
  • Confirmed in game: the looping server-record replay bot is back in the scoreboard on maps that have no navigation mesh, which is what BotNavIgnore exists for.

Note for anyone running GameFixes_mm

Set its rampbug and water_jump modules to "enable" "0". FixWaterFloorJump rewrites a float constant in place, so applying both leaves a wrong value.

Sharpyku added 2 commits July 10, 2026 14:52
…NavIgnore gamedata

- sdk -> alliedmodders/hl2sdk@5f891c9 (2026-07-09, fixes g_bUpdateStringTokenDatabase ABI break)
- BotNavIgnore linux signature + patch payload synced with Source2ZE/CS2Fixes upstream, validated against live 1.41.6.9 libserver.so
@Sharpyku
Sharpyku changed the base branch from main to dependabot/submodules/hl2sdk-manifests-0019b27 July 10, 2026 13:55
@Sharpyku
Sharpyku changed the base branch from dependabot/submodules/hl2sdk-manifests-0019b27 to dependabot/submodules/sdk-b8dcaf1 July 10, 2026 13:55
…p clip)

Since the CS2 Season 5 jump rework (buffered jump presses via
CCSPlayerLegacyJump / m_flJumpPressedTime), a mousewheel +jump press
exists only in the subtick move entries. Stripping those entries made
scroll jumps come out clipped ("glued to the floor") while held space
still worked, because the held button survives in the tick-boundary
button state. Keep stripping WASD/duck subtick moves and subtick
viewangles for the consistent tick feel, but let jump through.
@Andrey309a

Copy link
Copy Markdown

@M-archand can check and merge this pls

@Sharpyku

Copy link
Copy Markdown
Author

@Andrey309a i forked it, check my profile

@Andrey309a

Copy link
Copy Markdown

@Andrey309a i forked it, check my profile

Works ty

@Sharpyku
Sharpyku changed the base branch from dependabot/submodules/sdk-b8dcaf1 to main July 25, 2026 10:44
@MasterTishere

Copy link
Copy Markdown

@Sharpyku this metamod plugin has issue i can't use mouse scroll jump it keep getting stuck in the air .....

@Sharpyku

Sharpyku commented Sep 1, 2026 •

Copy link
Copy Markdown
Author

@Sharpyku this metamod plugin has issue i can't use mouse scroll jump it keep getting stuck in the air .....

Hey, yeah, I know about that issue. I fixed it a long time ago, just go ahead and download the latest fork

https://github.com/Sharpyku/STFixes-metamod/actions/runs/29127302797

@Andrey309a

Copy link
Copy Markdown

@Sharpyku this metamod plugin has issue i can't use mouse scroll jump it keep getting stuck in the air .....

Hey, yeah, I know about that issue. I fixed it a long time ago, just go ahead and download the latest fork

https://github.com/Sharpyku/STFixes-metamod/actions/runs/29127302797

I think this version works better https://github.com/edgegamers/poor-sharptimer

@Sharpyku

Sharpyku commented Sep 2, 2026 •

Copy link
Copy Markdown
Author

@Sharpyku this metamod plugin has issue i can't use mouse scroll jump it keep getting stuck in the air .....

Hey, yeah, I know about that issue. I fixed it a long time ago, just go ahead and download the latest fork
https://github.com/Sharpyku/STFixes-metamod/actions/runs/29127302797

I think this version works better https://github.com/edgegamers/poor-sharptimer

Okay, if that works better for you, use that one,

what you gave me is basically the actual recompiled Sharptimer script, I don’t really see the point but anyway

@MasterTishere

MasterTishere commented Sep 24, 2026 •

Copy link
Copy Markdown

@Sharpyku After new update its no longer working

@Sharpyku

Copy link
Copy Markdown
Author

@Sharpyku After new update its no longer working

yeah, after the latest update everything got fucked up... i’ll update it again when i have time

SudoGool and others added 10 commits September 26, 2026 16:59
…41.8.2

Metamod:Source 2.0 (plugin API 18, build git1472) dropped SourceHook, so the
previous build could not be loaded at all. Merge SudoGool's port from
SudoGool/STFixes-metamod@metamod-api18, which moves the four hooks to KHook,
bumps the SDK submodule to dadd5d7 and drops the obsolete tier1.a from the link
inputs. Their branch is taken as-is for the submodule pin, since the port was
validated against that SDK.

Two conflicts with this fork's own history, both kept on our side:

  - AMBuilder: both sides added common/valveextensions.proto to the protoc
    sources and the merge duplicated the line. Removed the duplicate.
  - src/detours.cpp keeps dfde32d, the IN_JUMP exemption from subtick input
    stripping. Without it a mousewheel jump is eaten on Season 5.

CheckJumpButtonWater no longer resolved after the CS2 update of 2026-09-22
(PatchVersion 1.41.8.2). It is the one lookup that aborts the whole plugin load,
which is why the plugin has been absent from the servers and why the looping
replay bot stopped spawning: BotNavIgnore, the patch that lets bots be added on
maps with no navigation mesh, never got applied.

Valve moved the addressing from [r13+disp32] to [r12+disp32], so 41 C7 85 became
41 C7 84 24 and each mov grew by a byte, which knocked the old wildcard mask out
of alignment. Verified against the live libserver.so: the old pattern matches 0
times, the new one matches exactly once, at 0x15b1cb7.

Audited all 29 linux signatures against that binary. Everything the plugin
requires at load now resolves: the three RESOLVE_SIG entries, the three detours
and BotNavIgnore. ServerMovementUnlock is still broken but is never looked up,
because cs2f_movement_unlocker_enable defaults to 0.
The API 18 port came with a new Windows workflow that copies Metamod's KHook
headers into place, but the existing Linux CI was never touched, so it failed on
the first translation unit:

  mmsource-2.0/core/ISmmPlugin.h:489:10: fatal error: 'khook.hpp' file not found

core/ISmmPlugin.h includes "khook.hpp" as a sibling of itself, while Metamod
ships KHook under third_party/khook/include. Copy the header and its directory
next to ISmmPlugin.h before configuring, and fail loudly if they are not where
we expect rather than letting the compiler report it several steps later.

Also pin the Metamod checkout to 05c5c63 instead of tracking master. That is the
build the port was validated against, and the plugin ABI moves without notice;
tracking master means a green build today and an unloadable binary tomorrow.
actions/checkout does not resolve an abbreviated SHA. Given ref: 05c5c63 it
treats the value as a ref name pattern and fetches refs/heads/05c5c63* and
refs/tags/05c5c63*, matches nothing, and fails after three attempts:

  git -c protocol.version=2 fetch --no-tags --prune --depth=1 origin
      +refs/heads/05c5c63*:refs/remotes/origin/05c5c63* ...
  The process '/usr/bin/git' failed with exit code 1

Spell the commit out in full. Same commit, same intent as the previous change.
@Sharpyku Sharpyku changed the title Season 5 (CS2 1.41.6.9) support: hl2sdk bump, valveextensions.proto, BotNavIgnore gamedata Metamod API 18 + CS2 1.41.8.2: KHook port, CheckJumpButtonWater signature, Linux CI fixes Sep 28, 2026
@Sharpyku

Sharpyku commented Sep 30, 2026 •

Copy link
Copy Markdown
Author

@MasterTishere updated

Since the CS2 update of 2026-10-22 (PatchVersion 1.41.9.2), every server with
this plugin crashed about 18 seconds after boot, the moment the first client
(a bot or a player) connected:

  [CS2Fixes] Hook_ClientActive(0, 0, "Dabisi", 0)
  Segmentation fault (core dumped)

The core dump puts the fault in CPlayerManager::OnClientConnected+34, reading
gpGlobals->maxClients with gpGlobals == NULL. The StartupServer hook did run
(g_pEntitySystem is set in the same function), so it is
IVEngineServer2::GetServerGlobals that now returns null under the SDK's vtable
layout.

Read the globals from INetworkGameServer::GetGlobals instead, which is how
CounterStrikeSharp and upstream CS2Fixes get them, and which still works on
the updated servers. Also refuse to track a client, rather than crash, if the
globals are still unknown when it connects, and make GetPlayer return null in
that case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants