Merge pull request #22 from stevenc99/DedicatedServer

Dedicated server
This commit is contained in:
Ryan C. Gordon 2016-04-15 13:00:25 -04:00
commit 4f9b11eada

View File

@ -39,6 +39,10 @@ CTString sam_strGameName = "serioussam";
CTimerValue _tvLastLevelEnd((__int64) -1); CTimerValue _tvLastLevelEnd((__int64) -1);
// Not used; dummy declaration only needed by
// Engine/Base/ErrorReporting.o
HWND _hwndMain = NULL;
void InitializeGame(void) void InitializeGame(void)
{ {
#ifdef STATICALLY_LINKED #ifdef STATICALLY_LINKED
@ -101,7 +105,7 @@ void LimitFrameRate(void)
TIME tmCurrentDelta = (tvNow-tvLast).GetSeconds(); TIME tmCurrentDelta = (tvNow-tvLast).GetSeconds();
// limit maximum frame rate // limit maximum frame rate
ded_iMaxFPS = ClampDn( ded_iMaxFPS, 1L); ded_iMaxFPS = ClampDn( ded_iMaxFPS, 1);
TIME tmWantedDelta = 1.0f / ded_iMaxFPS; TIME tmWantedDelta = 1.0f / ded_iMaxFPS;
if( tmCurrentDelta<tmWantedDelta) if( tmCurrentDelta<tmWantedDelta)
_pTimer->Sleep( (DWORD) ((tmWantedDelta-tmCurrentDelta)*1000.0f) ); _pTimer->Sleep( (DWORD) ((tmWantedDelta-tmCurrentDelta)*1000.0f) );