r5sdk/r5dev/engine/baseclientstate.cpp
2022-05-01 20:57:08 +02:00

54 lines
1.7 KiB
C++

//===========================================================================//
//
// Purpose: Implementation of the CBaseClient class.
//
//===========================================================================//
#include "core/stdafx.h"
#include "client/cdll_engine_int.h"
#include "engine/debugoverlay.h"
#include "engine/baseclientstate.h"
//------------------------------------------------------------------------------
// Purpose: returns true if client simulation is paused
//------------------------------------------------------------------------------
bool CBaseClientState::IsPaused()
{
return **m_bPaused;
}
//------------------------------------------------------------------------------
// Purpose: gets the client time
// Technically doesn't belong here
//------------------------------------------------------------------------------
float CBaseClientState::GetClientTime()
{
if (*cl_time_use_host_tickcount)
{
return (float)(int)**host_tickcount * (float)*client_debugdraw_int_unk;
}
else
{
return *(float*)client_debugdraw_float_unk;
}
}
//------------------------------------------------------------------------------
// Purpose: gets the client simulation tick count
//------------------------------------------------------------------------------
int CBaseClientState::GetClientTickCount() const
{
return **host_tickcount;
}
//------------------------------------------------------------------------------
// Purpose: sets the client simulation tick count
//------------------------------------------------------------------------------
void CBaseClientState::SetClientTickCount(int tick)
{
**host_tickcount = tick;
}
CBaseClientState* g_pBaseClientState = new CBaseClientState();