r5sdk/r5dev/engine/baseclientstate.cpp
Amos 8079e0ed4c Heavy cleanup for CHostState methods and signatures
* Add Cbuf_AddText and Cbuf_Execute signatures.
* Remove additional VGui stuff from dedicated statemachine.
* Move signatures to their respective headers.
* De-inline 'CHostState::FrameUpdate()'
* Ported al new patters to GAMEDLL_S1, CEngine still recreation needs extra work
2022-02-19 02:31:16 +01: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();