Skip to content

Commit

Permalink
Add com_clientFPS, defaults to 60.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamagi committed Sep 12, 2020
1 parent 14b5bd2 commit e955a09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo/framework/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ idCVar com_makingBuild( "com_makingBuild", "0", CVAR_BOOL | CVAR_SYSTEM, "1 when
idCVar com_updateLoadSize( "com_updateLoadSize", "0", CVAR_BOOL | CVAR_SYSTEM | CVAR_NOCHEAT, "update the load size after loading a map" );
idCVar com_asyncClient ( "com_asyncClient", "0", CVAR_BOOL | CVAR_SYSTEM | CVAR_ARCHIVE, "run client and renderer asynchronous" );
idCVar com_renderFPS( "com_renderFPS", "300", CVAR_INTEGER | CVAR_SYSTEM | CVAR_ARCHIVE, "frames per second to render" );
idCVar com_clientFPS( "com_clientFPS", "60", CVAR_INTEGER | CVAR_SYSTEM | CVAR_ARCHIVE, "times per second the game is called" );

idCVar com_product_lang_ext( "com_product_lang_ext", "1", CVAR_INTEGER | CVAR_SYSTEM | CVAR_ARCHIVE, "Extension to use when creating language files." );

Expand Down Expand Up @@ -2418,7 +2419,7 @@ void idCommonLocal::Frame( void ) {
clientdelta += frametime;
renderdelta += frametime;

if ( clientdelta < ( 1000000 / 60 ) ) {
if ( clientdelta < ( 1000000 / cvarSystem->GetCVarBool( "com_clientFPS" ) ) ) {
clientframe = false;
} else {
clientdelta = 0;
Expand Down
1 change: 1 addition & 0 deletions neo/framework/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ extern idCVar com_makingBuild;
extern idCVar com_updateLoadSize;
extern idCVar com_asyncClient;
extern idCVar com_renderFPS;
extern idCVar com_clientFPS;

extern int time_gameFrame; // game logic time
extern int time_gameDraw; // game present time
Expand Down

0 comments on commit e955a09

Please sign in to comment.