From 3d776b2799b7fb7ef3182a09434d4779be830d19 Mon Sep 17 00:00:00 2001 From: GameChaos Date: Thu, 21 Nov 2024 00:21:59 +0200 Subject: [PATCH] Linux sigs for debug vis --- gamedata/cs2kz-core.games.txt | 5 +++++ src/utils/interfaces.h | 2 +- src/utils/utils_interface.cpp | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gamedata/cs2kz-core.games.txt b/gamedata/cs2kz-core.games.txt index 7c24542c..6533c6c9 100644 --- a/gamedata/cs2kz-core.games.txt +++ b/gamedata/cs2kz-core.games.txt @@ -73,16 +73,19 @@ { "library" "server" "windows" "\x48\x89\x5C\x24\x08\x48\x89\x74\x24\x10\x57\x48\x83\xEC\x30\xC6\x41\x28\x00" + "linux" "\x48\xB8\x08\x00\x00\x00\x00\x00\x00\x80\x55\x48\x89\xE5\x41\x54\x53" } "DebugDrawRay" { "library" "server" "windows" "\x48\x89\x5C\x24\x08\x48\x89\x6C\x24\x10\x48\x89\x74\x24\x18\x57\x48\x81\xEC\xA0\x00\x00\x00\x48\x83\x3D\x79\xC6\xDF\x00\x00" + "linux" "\x55\x49\x89\xF2\x89\xD6\x89\xCA\x48\x89\xE5" } "DebugDrawMesh" { "library" "server" "windows" "\x48\x89\x4C\x24\x08\x55\x53\x57\x41\x54\x41\x55\x48\x8D\x6C\x24\x90" + "linux" "\x55\x48\x89\xE5\x41\x57\x41\x56\x49\x89\xFE\x41\x55\x41\x54\x53\x48\x81\xEC\x2A\x2A\x2A\x2A\x8B\x45" } //*(a2 + 200) = sub_7FFE4786BD30(a1->pawn); <- this function // v23 = a1->pawn; @@ -393,10 +396,12 @@ "DebugTriangle" { "windows" "51" + "linux" "52" } "GetDebugOverlay" { "windows" "86" + "linux" "86" } } } diff --git a/src/utils/interfaces.h b/src/utils/interfaces.h index b9a07683..57d571fe 100644 --- a/src/utils/interfaces.h +++ b/src/utils/interfaces.h @@ -145,7 +145,7 @@ class KZUtils // Get the real and connected player count. virtual u32 GetPlayerCount(); - virtual void AddTriangleOverlay(Vector const &p1, Vector const &p2, Vector const &p3, int r, int g, int b, int a, bool noDepthTest, + virtual void AddTriangleOverlay(Vector const &p1, Vector const &p2, Vector const &p3, u8 r, u8 g, u8 b, u8 a, bool noDepthTest, f64 flDuration); }; diff --git a/src/utils/utils_interface.cpp b/src/utils/utils_interface.cpp index 67b6ee92..9318df0e 100644 --- a/src/utils/utils_interface.cpp +++ b/src/utils/utils_interface.cpp @@ -288,11 +288,11 @@ u32 KZUtils::GetPlayerCount() return count; } -void KZUtils::AddTriangleOverlay(Vector const &p1, Vector const &p2, Vector const &p3, int r, int g, int b, int a, bool noDepthTest, f64 flDuration) +void KZUtils::AddTriangleOverlay(Vector const &p1, Vector const &p2, Vector const &p3, u8 r, u8 g, u8 b, u8 a, bool noDepthTest, f64 flDuration) { void *debugoverlay = CALL_VIRTUAL(void *, g_pGameConfig->GetOffset("GetDebugOverlay"), interfaces::pServer); if (debugoverlay) { - CALL_VIRTUAL(void, g_pGameConfig->GetOffset("DebugTriangle"), debugoverlay, p1, p2, p3, r, g, b, a, noDepthTest, flDuration); + CALL_VIRTUAL(void, g_pGameConfig->GetOffset("DebugTriangle"), debugoverlay, &p1, &p2, &p3, r, g, b, a, noDepthTest, flDuration); } }