fix clientsdk compilation

This commit is contained in:
rexx 2022-07-13 19:46:55 +01:00
parent 46a3535b27
commit 35515f1ef5
3 changed files with 16 additions and 2 deletions

View File

@ -78,6 +78,7 @@ static_assert(sizeof(CServer) == 0x4A440);
#else
static_assert(sizeof(CServer) == 0x4A4C0);
#endif
extern CServer* g_pServer;
/* ==== CSERVER ========================================================================================================================================================= */

View File

@ -10,7 +10,9 @@
#include <engine/net.h>
#include <engine/host_state.h>
#include <engine/sys_utils.h>
#ifndef CLIENT_DLL
#include <engine/server/server.h>
#endif
#include <squirrel/sqinit.h>
#include <networksystem/pylon.h>
#include <public/include/edict.h>

View File

@ -16,9 +16,12 @@
#include <materialsystem/cmaterialsystem.h>
#include <engine/debugoverlay.h>
#include <engine/client/clientstate.h>
#include <engine/server/server.h>
#include <materialsystem/cmaterialglue.h>
#ifndef CLIENT_DLL
#include <engine/server/server.h>
#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())
{