From 6b93938d6b67c2fc8c38b77dc1a68df15c553186 Mon Sep 17 00:00:00 2001 From: Karfunkel Date: Sat, 3 Oct 2026 14:01:56 +0200 Subject: [PATCH 1/6] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ffcc13160..7352c4105 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ find_package(imguizmo CONFIG REQUIRED) find_package(unofficial-imgui-node-editor CONFIG REQUIRED) find_package(implot CONFIG REQUIRED) find_package(directxtex CONFIG REQUIRED) -#CPMAddPackage("gh:ValveSoftware/GameNetworkingSockets@1.4.1") +CPMAddPackage("gh:ValveSoftware/GameNetworkingSockets@1.4.1") CPMAddPackage("gh:OrfeasZ/ZHMTools@4.0.0") #add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../ZHMTools" "${VCPKG_BUILD_ROOT}/zhmtools") From 676433af73263741af53b9f22f81cdf5865d6cd3 Mon Sep 17 00:00:00 2001 From: Karfunkel Date: Sat, 3 Oct 2026 14:03:19 +0200 Subject: [PATCH 2/6] Update vcpkg.json --- vcpkg.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index b7ca50594..35e5467ba 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -14,7 +14,9 @@ { "name": "usockets", "default-features": false, - "features": [] + "features": [ + "network" + ] }, "uwebsockets", "simdjson", From c8c49949df4356a7e66974e206bcbb6e4fb5e926 Mon Sep 17 00:00:00 2001 From: Karfunkel Date: Sat, 3 Oct 2026 14:06:22 +0200 Subject: [PATCH 3/6] Update vcpkg.json --- vcpkg.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index 35e5467ba..7dcaf49e4 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -8,15 +8,12 @@ "lz4", "directx-headers", "protobuf", - "gamenetworkingsockets", "zlib", "libuv", { "name": "usockets", "default-features": false, - "features": [ - "network" - ] + "features": [] }, "uwebsockets", "simdjson", From db50db50a30f2536fea4876a5a268a2a42e7842e Mon Sep 17 00:00:00 2001 From: Karfunkel Date: Sat, 3 Oct 2026 14:58:05 +0200 Subject: [PATCH 4/6] Update build.yml --- .github/workflows/build.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 722db1bdb..d21730d57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,12 +38,24 @@ jobs: - name: Build and install debug run: | cmake --preset x64-Debug . + $f = Get-ChildItem _build/x64-Debug -Recurse -Filter steamnetworkingsockets_internal.h | Select-Object -First 1 + if (-not $f) { throw "GNS header nicht gefunden" } + $txt = Get-Content $f.FullName -Raw + $new = $txt -replace 'msg\.GetTypeName\(\)\.c_str\(\)', 'std::string( msg.GetTypeName() ).c_str()' + if ($new -eq $txt) { throw "Patch wurde nicht angewendet" } + Set-Content -Path $f.FullName -Value $new -NoNewline cmake --build _build/x64-Debug -j12 cmake --install _build/x64-Debug - name: Build and install release run: | cmake --preset x64-Release . + $f = Get-ChildItem _build/x64-Release -Recurse -Filter steamnetworkingsockets_internal.h | Select-Object -First 1 + if (-not $f) { throw "GNS header nicht gefunden" } + $txt = Get-Content $f.FullName -Raw + $new = $txt -replace 'msg\.GetTypeName\(\)\.c_str\(\)', 'std::string( msg.GetTypeName() ).c_str()' + if ($new -eq $txt) { throw "Patch wurde nicht angewendet" } + Set-Content -Path $f.FullName -Value $new -NoNewline cmake --build _build/x64-Release -j12 cmake --install _build/x64-Release @@ -173,4 +185,4 @@ jobs: upload_url: ${{ steps.get_release.outputs.upload_url }} asset_path: ${{ matrix.artifact }}/${{ matrix.artifact }}.zip asset_name: ${{ matrix.artifact }}.zip - asset_content_type: application/zip \ No newline at end of file + asset_content_type: application/zip From b921d46d8ed631568f0307a3c4b461eafa54e2bf Mon Sep 17 00:00:00 2001 From: Karfunkel Date: Sat, 3 Oct 2026 15:35:08 +0200 Subject: [PATCH 5/6] Update Hitmen.h --- Mods/Hitmen/Src/Hitmen.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mods/Hitmen/Src/Hitmen.h b/Mods/Hitmen/Src/Hitmen.h index 0fd6e7fbb..4482e44a4 100644 --- a/Mods/Hitmen/Src/Hitmen.h +++ b/Mods/Hitmen/Src/Hitmen.h @@ -40,9 +40,9 @@ class Hitmen : public IPluginInterface void OnNpcPositions(BinaryStreamReader& p_Reader); private: - DECLARE_PLUGIN_DETOUR(Hitmen, void, OnLoadScene, ZEntitySceneContext*, ZSceneData&); + DECLARE_PLUGIN_DETOUR(Hitmen, bool, OnLoadScene, ZEntitySceneContext*, SSceneInitParameters&); DECLARE_PLUGIN_DETOUR(Hitmen, void, OnClearScene, ZEntitySceneContext* th, bool p_FullyUnloadScene); - DECLARE_PLUGIN_DETOUR(Hitmen, TEntityRef*, GetLocalPlayer, ZPlayerRegistry* th, TEntityRef* out); + // DECLARE_PLUGIN_DETOUR(Hitmen, TEntityRef*, GetLocalPlayer, ZPlayerRegistry* th, TEntityRef* out); private: bool m_Initialized = false; From 38b6bb8a9b6f3c3b72ee86243b318b6a4b8ace8a Mon Sep 17 00:00:00 2001 From: Karfunkel Date: Sat, 3 Oct 2026 15:39:22 +0200 Subject: [PATCH 6/6] Update Hitmen.cpp --- Mods/Hitmen/Src/Hitmen.cpp | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/Mods/Hitmen/Src/Hitmen.cpp b/Mods/Hitmen/Src/Hitmen.cpp index 8e188db38..34c7f3b8e 100644 --- a/Mods/Hitmen/Src/Hitmen.cpp +++ b/Mods/Hitmen/Src/Hitmen.cpp @@ -14,7 +14,7 @@ #include "Glacier/EntityFactory.h" #include -#include "backends/imgui_impl_dx12.h" +#include #include "Glacier/SGameUpdateEvent.h" #include "Glacier/ZCollision.h" #include "Glacier/ZPhysics.h" @@ -64,7 +64,6 @@ void Hitmen::Init() { Hooks::ZEntitySceneContext_ClearScene->AddDetour(this, &Hitmen::OnClearScene); Hooks::ZEntitySceneContext_LoadScene->AddDetour(this, &Hitmen::OnLoadScene); - Hooks::ZPlayerRegistry_GetLocalPlayer->AddDetour(this, &Hitmen::GetLocalPlayer); } static void ServerCallback(SteamNetConnectionStatusChangedCallback_t* p_Info) @@ -578,24 +577,10 @@ void Hitmen::OnDraw3D(IRenderer* p_Renderer) } }*/ } - -DEFINE_PLUGIN_DETOUR(Hitmen, void, OnLoadScene, ZEntitySceneContext* th, ZSceneData& p_SceneData) -{ - // p_SceneData.m_sceneName = "assembly:/_pro/scenes/users/notex/test.entity"; - //p_SceneData.m_sceneName = "assembly:/_pro/scenes/missions/golden/mission_gecko/scene_gecko_basic.entity"; - //p_SceneData.m_sceneName = "assembly:/_PRO/Scenes/Missions/TheFacility/_Scene_Mission_Polarbear_Module_002_B.entity"; - //p_SceneData.m_sceneBricks.clear(); - - //p_SceneData.m_sceneName = "assembly:/_PRO/Scenes/Missions/Ancestral/scene_bulldog.entity"; - //p_SceneData.m_sceneBricks.clear(); - //p_SceneData.m_sceneBricks.push_back("assembly:/_PRO/scenes/missions/golden/mission_gecko/mission_gecko.brick"); - - /* - * Loading scene: assembly:/_pro/scenes/missions/golden/mission_gecko/scene_gecko_basic.entity -+ With brick: assembly:/_PRO/scenes/missions/golden/mission_gecko/mission_gecko.brick - */ - return HookResult(HookAction::Continue()); -} + DEFINE_PLUGIN_DETOUR(Hitmen, bool, OnLoadScene, ZEntitySceneContext* th, SSceneInitParameters& p_SceneData) + { + return HookResult(HookAction::Continue()); + } DEFINE_PLUGIN_DETOUR(Hitmen, void, OnClearScene, ZEntitySceneContext* th, bool p_FullyUnloadScene) { @@ -605,11 +590,4 @@ DEFINE_PLUGIN_DETOUR(Hitmen, void, OnClearScene, ZEntitySceneContext* th, bool p return HookResult(HookAction::Continue()); } -DEFINE_PLUGIN_DETOUR(Hitmen, TEntityRef*, GetLocalPlayer, ZPlayerRegistry* th, TEntityRef* out) -{ - auto s_Result = p_Hook->CallOriginal(th, out); - - return HookResult(HookAction::Return(), out); -} - DEFINE_ZHM_PLUGIN(Hitmen);