Skip to content

Commit

Permalink
Linux sigs for debug vis
Browse files Browse the repository at this point in the history
  • Loading branch information
GameChaos committed Nov 20, 2024
1 parent 3749250 commit 3d776b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions gamedata/cs2kz-core.games.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -393,10 +396,12 @@
"DebugTriangle"
{
"windows" "51"
"linux" "52"
}
"GetDebugOverlay"
{
"windows" "86"
"linux" "86"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down
4 changes: 2 additions & 2 deletions src/utils/utils_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 3d776b2

Please sign in to comment.