Skip to content

Migrate to KHook + misc dev - #466

Draft
Vauff wants to merge 39 commits into
mainfrom
dev
Draft

Vauff wants to merge 39 commits into
mainfrom
dev

Conversation

@Vauff

@Vauff Vauff commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor
  • Added custom hud API for plugin use
  • Switched from signature to schema manipulator to construct CTakeDamageInfo
  • Added a fix for competitive cooldowns always being applied by the game
  • Made player_connect obey cs2f_map_steamids_enable
  • Migrated to KHook (Migrate to KHook #464)
  • Updated signatures for 2026-09-09 CS2 update
  • Overhauled map migrations to fix an out-of-bounds rendermode issue & run cleanly during map load when possible, this is similar to Stripper and now possible thanks to KHook
  • Overhauled the custom cfg parser to skip the command buffer, and process changes immediately
  • Added an additional early cfg execution, to ensure map migrations have access to correct cvar values for the upcoming map
  • Allowed rendermode migrations to run independent of map update time
    • Index-based rendermodes only come from the S1 map importer, S2 Hammer always uses enum-named render modes, so we can confidently assume that new maps will not be caught off by this, while we can also extend this migration to new/recently updated ports
  • Hardened map download queue logic & added delay to avoid Steam rate limit
    • Hitting the rate limit was problematic because it could break required on-demand downloads elsewhere

AI disclosure: Substantially used for RE in the competitive cooldown kick fix, its findings have proven themselves on a live server

xen-000 and others added 26 commits August 28, 2026 05:47
Based on sv_kick_players_with_cooldown cvar description, this should only happen when set to 2
* Switch to Metamod KHook development branch

* fix includes, some definitely wrong messing around with api

* first khook theoretically working

* Finish migration of main virtual hooks

Still needs testing

* fix building docker container

* fix build errors

* fix more build errors

* update khook include path

* Fix VTable hooks

* Migrate EntWatch virtual hooks

* various fixes & remove/add some todo's

* more fixes

* "fix" another calloriginal

* Fix EntWatch crashes

* Re-enable GoToIntermission hook

Seems to have stopped crashing?

* Fix PostEventAbstract crash

* Migrate detour system to KHook

* fix TakeDamage crash

* Fix template deduction for windows compilation (#449)

* Fix template deduction

* alternative workaround: explicitly define template arguments

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Co-authored-by: Vauff <mctehkitti@gmail.com>

* fix bad copy paste

* Replace our signature lookup with KHook's implementation

This allows for signature lookups to always work even on signatures modified by another plugins KHook detour

* switch back to metamod master branch

* Remove wildcard converter now that KHook supports singles

* Address automatic review findings

---------

Co-authored-by: Benoist <14257866+Kenzzer@users.noreply.github.com>
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Seems like the game passes nullptr in some situations
this has been wrong for a while but funchook didn't seem to care
- Overhauled map migrations to fix an out-of-bounds rendermode issue & run cleanly during map load when possible, similar to Stripper
- Overhauled the custom cfg parser to skip the command buffer, and process changes immediately
- Added an additional early cfg execution, to ensure map migrations has access to correct cvar values for the upcoming map
Index-based rendermodes only come from the S1 map importer. S2 Hammer always uses enum-named render modes, so we can confidently assume that new maps will not be caught off by this, while we can also extend this migration to new/recently updated ports
@Vauff
Vauff enabled auto-merge (rebase) September 19, 2026 04:50
I tried to avoid having to use a new hook hence the funny hack
@Vauff
Vauff disabled auto-merge September 21, 2026 16:16
@Vauff
Vauff marked this pull request as draft September 23, 2026 11:17
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