2022-08-29 01:14:53 +02:00
|
|
|
//=============================================================================//
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
//=============================================================================//
|
|
|
|
|
|
|
|
#include "core/stdafx.h"
|
2022-08-29 02:21:32 +02:00
|
|
|
#include "tier1/cvar.h"
|
2022-08-29 01:14:53 +02:00
|
|
|
#include "engine/sdk_dll.h"
|
2022-08-29 02:21:32 +02:00
|
|
|
#ifndef DEDICATED
|
|
|
|
#include "gameui/IBrowser.h"
|
|
|
|
#include "gameui/IConsole.h"
|
|
|
|
#endif // !DEDICATED
|
|
|
|
|
2024-02-24 02:15:09 +01:00
|
|
|
static ConVar sdk_fixedframe_tickinterval("sdk_fixedframe_tickinterval", "0.01", FCVAR_RELEASE, "The tick interval used by the SDK fixed frame.");
|
|
|
|
|
2022-08-29 02:21:32 +02:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
void CEngineSDK::FixedFrame()
|
|
|
|
{
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
#ifndef DEDICATED
|
2024-01-21 21:29:23 +01:00
|
|
|
g_Browser.Think();
|
|
|
|
g_Console.Think();
|
2022-08-29 02:21:32 +02:00
|
|
|
#endif // !DEDICATED
|
2024-02-24 02:15:09 +01:00
|
|
|
std::this_thread::sleep_for(IntervalToDuration(sdk_fixedframe_tickinterval.GetFloat()));
|
2022-08-29 02:21:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-21 21:29:23 +01:00
|
|
|
CEngineSDK g_EngineSDK;
|