mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Avoid heap memory allocation and a level of indirection. This allows the compiler to optimize the program even more. No logic has been changed in this patch.
31 lines
780 B
C++
31 lines
780 B
C++
//=============================================================================//
|
|
//
|
|
// Purpose:
|
|
//
|
|
//=============================================================================//
|
|
|
|
#include "core/stdafx.h"
|
|
#include "tier1/cvar.h"
|
|
#include "engine/sdk_dll.h"
|
|
#ifndef DEDICATED
|
|
#include "gameui/IBrowser.h"
|
|
#include "gameui/IConsole.h"
|
|
#endif // !DEDICATED
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
void CEngineSDK::FixedFrame()
|
|
{
|
|
for (;;)
|
|
{
|
|
#ifndef DEDICATED
|
|
g_Browser.Think();
|
|
g_Console.Think();
|
|
#endif // !DEDICATED
|
|
std::this_thread::sleep_for(IntervalToDuration(sdk_fixedframe_tickinterval->GetFloat()));
|
|
}
|
|
}
|
|
|
|
CEngineSDK g_EngineSDK;
|