diff --git a/code/client/cl_cgame.cpp b/code/client/cl_cgame.cpp index ff5793a..2d56920 100644 --- a/code/client/cl_cgame.cpp +++ b/code/client/cl_cgame.cpp @@ -674,6 +674,12 @@ static void CL_SetMaxFPS( int maxFPS ) } +void CL_DisableFramerateLimiter() +{ + CL_SetMaxFPS( 0 ); +} + + void CL_InitCGame() { int t = Sys_Milliseconds(); diff --git a/code/qcommon/common.cpp b/code/qcommon/common.cpp index 0ee08c4..1310ec9 100644 --- a/code/qcommon/common.cpp +++ b/code/qcommon/common.cpp @@ -282,6 +282,10 @@ void QDECL Com_ErrorExt( int code, int module, qbool realError, const char *fmt, Cvar_Set("com_errorMessage", com_errorMessage); } +#ifndef DEDICATED + CL_DisableFramerateLimiter(); +#endif + if ( code == ERR_SERVERDISCONNECT ) { #ifndef DEDICATED CL_Disconnect( qtrue ); diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index b247d00..4a5679f 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -1019,6 +1019,11 @@ qbool CL_DemoPlaying(); void CL_NextDemo(); // invoke the "nextdemo" cvar as a command, if not empty +void CL_DisableFramerateLimiter(); +// map loads might be interrupted by a drop-style error, +// which would leave the FPS limit enabled until the next successful map load +// this should therefore always be called by Com_Error + void Key_KeyNameCompletion( void (*callback)(const char *s) ); // for /bind and /unbind auto-completion