fix: port to KHook for Metamod 2.0 build 1461+
Some checks failed
Continuous Integration / Build on Linux via Docker Compose (push) Has been cancelled
Continuous Integration / Build on Windows (MSVC) (push) Has been cancelled
Continuous Integration / Release (push) Has been cancelled

Metamod 1461+ removed SourceHook (plugin API 17 -> 18), so the MM plugin was rejected
and RayTraceImpl crashed on a null CRayTraceInterface002. Replace the two SourceHook
hooks with KHook, build against Metamod's bundled KHook headers, include ray.h
explicitly for the updated hl2sdk, and disambiguate TraceOptions/TraceResult from
CounterStrikeSharp 1.0.375's new types of the same name.
This commit is contained in:
Astra 2026-09-24 16:44:53 +01:00
parent 616e169a2c
commit 971e91c711
8 changed files with 33 additions and 46 deletions

View file

@ -41,11 +41,6 @@ list(APPEND SOURCE_FILES
${SOURCESDK_DIR}/entity2/entityidentity.cpp
${SOURCESDK_DIR}/entity2/entitysystem.cpp
${SOURCESDK_DIR}/entity2/entitykeyvalues.cpp
${METAMOD_DIR}/core/sourcehook/sourcehook.cpp
${METAMOD_DIR}/core/sourcehook/sourcehook_impl_chookidman.cpp
${METAMOD_DIR}/core/sourcehook/sourcehook_impl_chookmaninfo.cpp
${METAMOD_DIR}/core/sourcehook/sourcehook_impl_cvfnptr.cpp
${METAMOD_DIR}/core/sourcehook/sourcehook_impl_cproto.cpp
vendor/dynlibutils/module.cpp
vendor/dynlibutils/module.h
)