From 35515f1ef5f399b704236d089dcc32d3d3cfd824 Mon Sep 17 00:00:00 2001 From: rexx <67599507+r-ex@users.noreply.github.com> Date: Wed, 13 Jul 2022 19:46:55 +0100 Subject: [PATCH] fix clientsdk compilation --- r5dev/engine/server/server.h | 1 + r5dev/networksystem/pylon.cpp | 2 ++ r5dev/vgui/vgui_debugpanel.cpp | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/r5dev/engine/server/server.h b/r5dev/engine/server/server.h index 8d5124b3..04d9d110 100644 --- a/r5dev/engine/server/server.h +++ b/r5dev/engine/server/server.h @@ -78,6 +78,7 @@ static_assert(sizeof(CServer) == 0x4A440); #else static_assert(sizeof(CServer) == 0x4A4C0); #endif + extern CServer* g_pServer; /* ==== CSERVER ========================================================================================================================================================= */ diff --git a/r5dev/networksystem/pylon.cpp b/r5dev/networksystem/pylon.cpp index 0fd0aee8..aaf91ab5 100644 --- a/r5dev/networksystem/pylon.cpp +++ b/r5dev/networksystem/pylon.cpp @@ -10,7 +10,9 @@ #include #include #include +#ifndef CLIENT_DLL #include +#endif #include #include #include diff --git a/r5dev/vgui/vgui_debugpanel.cpp b/r5dev/vgui/vgui_debugpanel.cpp index 8bc6ce92..059b40d5 100644 --- a/r5dev/vgui/vgui_debugpanel.cpp +++ b/r5dev/vgui/vgui_debugpanel.cpp @@ -16,9 +16,12 @@ #include #include #include -#include #include +#ifndef CLIENT_DLL +#include +#endif + //----------------------------------------------------------------------------- // Purpose: proceed a log update //----------------------------------------------------------------------------- @@ -140,8 +143,16 @@ void CLogSystem::DrawSimStats(void) const static Color c = { 255, 255, 255, 255 }; static const char* szLogbuf[4096]{}; + +#ifdef CLIENT_DLL + snprintf((char*)szLogbuf, 4096, "Client Frame: (%d) Render Frame: (%d)\n", + g_pClientState->GetTick(), *render_tickcount); +#else snprintf((char*)szLogbuf, 4096, "Server Frame: (%d) Client Frame: (%d) Render Frame: (%d)\n", - g_pServer->GetTick(), g_pClientState->GetTick(), *render_tickcount); + g_pServer->GetTick(), g_pClientState->GetTick(), *render_tickcount); +#endif + + if (cl_simstats_invert_rect_x->GetBool()) {