[Client] Unlocked FPS and lag

[Client] Unlocked FPS and lag

diff --git a/src/docs/Changelog b/src/docs/Changelog
index 5025a3e..d18b196 100644
--- a/src/docs/Changelog
+++ b/src/docs/Changelog
@@ -10,6 +10,7 @@
 	* [Athentication Server] Changed default port address for the authentication server
 	* [Master Server] Changed default port address for the master server
 	* [Client] Fix drop shadows
+	* [Client] Unlocked FPS and lag
 
 2021-04-10 Dusan Jocic <dusanjocic@msn>
 	* [Libraries] Cleaning
diff --git a/src/engine/client/cl_input.cpp b/src/engine/client/cl_input.cpp
index 6f382e6..5eceb5e 100644
--- a/src/engine/client/cl_input.cpp
+++ b/src/engine/client/cl_input.cpp
@@ -1404,9 +1404,9 @@ void CL_WritePacket( void )
     {
         cvarSystem->Set( "cl_packetdup", "0" );
     }
-    else if( cl_packetdup->integer > 5 )
+    else if( cl_packetdup->integer > 1000 )
     {
-        cvarSystem->Set( "cl_packetdup", "5" );
+        cvarSystem->Set( "cl_packetdup", "1000" );
     }
     oldPacketNum = ( clc.netchan.outgoingSequence - 1 - cl_packetdup->integer ) & PACKET_MASK;
     count = cl.cmdNumber - cl.outPackets[oldPacketNum].p_cmdNumber;
diff --git a/src/engine/client/cl_main.cpp b/src/engine/client/cl_main.cpp
index 1882ba0..b73f070 100644
--- a/src/engine/client/cl_main.cpp
+++ b/src/engine/client/cl_main.cpp
@@ -3096,6 +3096,11 @@ void CL_Frame( sint msec )
         return;
     }
     
+    if( cls.realtime >= cls.lastTimeDraw + 1 )
+    {
+        cls.lastTimeDraw = cls.realtime;
+    }
+    
     if( cls.state == CA_DISCONNECTED && !( cls.keyCatchers & KEYCATCH_UI ) && !com_sv_running->integer && clc.demoplaying && uivm )
     {
         // if disconnected, bring up the menu
@@ -3820,7 +3825,7 @@ void CL_Init( void )
     
     cl_wavefilerecord = cvarSystem->Get( "cl_wavefilerecord", "0", CVAR_TEMP, "Toggle recording a .wav audio file upon loading a demo. Suggest setting to 0 in autoexec.cfg" );
     
-    cl_timeNudge = cvarSystem->Get( "cl_timeNudge", "0", CVAR_TEMP, "Supposed to be for adjusting prediction for your ping." );
+    cl_timeNudge = cvarSystem->Get( "cl_timeNudge", "0", CVAR_ARCHIVE, "Supposed to be for adjusting prediction for your ping." );
     cl_shownet = cvarSystem->Get( "cl_shownet", "0", CVAR_TEMP, "Display network quality graph" );
     cl_shownuments = cvarSystem->Get( "cl_shownuments", "0", CVAR_TEMP, "Display the number of entities in each packet" );
     cl_showServerCommands = cvarSystem->Get( "cl_showServerCommands", "0", 0, "Show server commands" );
diff --git a/src/engine/client/client.hpp b/src/engine/client/client.hpp
index aeb3e6c..5302ddb 100644
--- a/src/engine/client/client.hpp
+++ b/src/engine/client/client.hpp
@@ -302,6 +302,7 @@ typedef struct
     sint             frametime;														// msec since last frame
     sint             realtime;														// ignores pause
     sint             realFrametime;													// ignoring pause, so console always works
+    sint			lastTimeDraw;
     sint             numlocalservers;
     serverInfo_t    localServers[MAX_OTHER_SERVERS];
     sint             numglobalservers;
diff --git a/src/engine/client/clientGame.cpp b/src/engine/client/clientGame.cpp
index c0f67a3..25b02d5 100644
--- a/src/engine/client/clientGame.cpp
+++ b/src/engine/client/clientGame.cpp
@@ -1215,7 +1215,7 @@ void idClientGameSystemLocal::SetCGameTime( void )
 #ifdef _DEBUG
         timeNudge = Com_Clampi( -900, 900, timeNudge );
 #else
-        timeNudge = Com_Clampi( -2000, 2000, timeNudge );
+        timeNudge = Com_Clampi( -30, 30, timeNudge );
 #endif
         
         cl.serverTime = cls.realtime + cl.serverTimeDelta - timeNudge;
diff --git a/src/engine/qcommon/common.cpp b/src/engine/qcommon/common.cpp
index 75efd82..8a0bb53 100644
--- a/src/engine/qcommon/common.cpp
+++ b/src/engine/qcommon/common.cpp
@@ -79,7 +79,6 @@ convar_t*         com_timescale;
 convar_t*         com_fixedtime;
 convar_t*         com_dropsim;	// 0.0 to 1.0, simulated packet drops
 convar_t*         com_journal;
-convar_t*         com_maxfps;
 convar_t*         com_timedemo;
 convar_t*         com_sv_running;
 convar_t*         com_cl_running;
@@ -121,9 +120,6 @@ convar_t*         com_protocol;
 convar_t* con_autochat;
 #endif
 
-convar_t* com_renderfps;
-convar_t* cl_commandsize;//Loda - FPS UNLOCK ENGINE
-
 // com_speeds times
 sint             time_game;
 sint             time_frontend;	// renderer frontend time
@@ -3227,7 +3223,6 @@ void Com_Init( valueType* commandLine )
     com_logfile = cvarSystem->Get( "logfile", "0", CVAR_TEMP, "Toggles saving a logfile" );
     
     // Gordon: no need to latch this in ET, our recoil is framerate independant
-    com_maxfps = cvarSystem->Get( "com_maxfps", "333", CVAR_ARCHIVE /*|CVAR_LATCH */, "Sets cap on the frames per second. 333, 125, 76 and 43 common 'tweak' values, as better for jumping. 85 default." );
 //  com_blood = cvarSystem->Get ("com_blood", "1", CVAR_ARCHIVE, "Enable blood mist effects."); // Gordon: no longer used?
 
     com_developer = cvarSystem->Get( "developer", "0", CVAR_TEMP, "Enable/disable (1/0) developer mode, allows cheats and so on." );
@@ -3290,9 +3285,6 @@ void Com_Init( valueType* commandLine )
     con_autochat = cvarSystem->Get( "con_autochat", "1", CVAR_ARCHIVE, "Set to 0 to disable sending console input text as chat when there is not a slash at the beginning." );
 #endif
     
-    com_renderfps = cvarSystem->Get( "com_renderfps", "0", CVAR_ARCHIVE, "" );
-    cl_commandsize = cvarSystem->Get( "cl_commandsize", "64", CVAR_ARCHIVE, "" ); //Loda - FPS UNLOCK ENGINE
-    
     idsystem->Init();
     
     if( idsystem->WritePIDFile( ) )
@@ -3587,10 +3579,6 @@ void Com_Frame( void )
         {
             minMsec = 1000 / com_maxfpsUnfocused->integer;
         }
-        else if( com_maxfps->integer > 0 )
-        {
-            minMsec = 1000 / com_maxfps->integer;
-        }
         else
         {
             minMsec = 1;
diff --git a/src/engine/qcommon/qcommon.hpp b/src/engine/qcommon/qcommon.hpp
index 6c35d2e..a4cf16a 100644
--- a/src/engine/qcommon/qcommon.hpp
+++ b/src/engine/qcommon/qcommon.hpp
@@ -427,10 +427,6 @@ extern convar_t*  sv_paused;
 extern convar_t*  cl_packetdelay;
 extern convar_t*  sv_packetdelay;
 
-extern convar_t* com_renderfps;
-extern convar_t* cl_commandsize;
-
-
 // com_speeds times
 extern sint      time_game;
 extern sint      time_frontend;

GitHub
sha: cce92f5e