]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
host: Remove sv_fixedframeratesingleplayer
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 14:27:33 +0000 (14:27 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 14:27:33 +0000 (14:27 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12843 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
host.c
server.h
sv_main.c

index a6a7e36192f3fe96ec00e36be0c6f5eeafccf478..02f876386018e5768cb1f9932c6cdd556474f0bc 100644 (file)
@@ -2068,11 +2068,7 @@ void CL_MoveLerpEntityStates(entity_t *ent)
        {
                // not a monster
                ent->persistent.lerpstarttime = ent->state_previous.time;
-               // no lerp if it's singleplayer
-               if (cl.islocalgame && !sv_fixedframeratesingleplayer.integer)
-                       ent->persistent.lerpdeltatime = 0;
-               else
-                       ent->persistent.lerpdeltatime = bound(0, ent->state_current.time - ent->state_previous.time, 0.1);
+               ent->persistent.lerpdeltatime = bound(0, ent->state_current.time - ent->state_previous.time, 0.1);
                VectorCopy(ent->persistent.neworigin, ent->persistent.oldorigin);
                VectorCopy(ent->persistent.newangles, ent->persistent.oldangles);
                VectorCopy(ent->state_current.origin, ent->persistent.neworigin);
@@ -3286,7 +3282,7 @@ static void CL_NetworkTimeReceived(double newtime)
        double timehigh;
        cl.mtime[1] = cl.mtime[0];
        cl.mtime[0] = newtime;
-       if (cl_nolerp.integer || cls.timedemo || (cl.islocalgame && !sv_fixedframeratesingleplayer.integer) || cl.mtime[1] == cl.mtime[0] || cls.signon < SIGNONS)
+       if (cl_nolerp.integer || cls.timedemo || cl.mtime[1] == cl.mtime[0] || cls.signon < SIGNONS)
                cl.time = cl.mtime[1] = newtime;
        else if (cls.demoplayback)
        {
diff --git a/host.c b/host.c
index 6b3ba40e1ca76de8ae4194aebe9a1a6e930f73f7..aedb1f7fa84a30e166311c92832adfe1411a2f6f 100644 (file)
--- a/host.c
+++ b/host.c
@@ -514,11 +514,6 @@ void Host_Main(void)
                                // stop running server frames if the wall time reaches this value
                                if (sys_ticrate.value <= 0)
                                        advancetime = sv_timer;
-                               else if (cl.islocalgame && !sv_fixedframeratesingleplayer.integer)
-                               {
-                                       // synchronize to the client frametime, but no less than 10ms and no more than 100ms
-                                       advancetime = bound(0.01, cl_timer, 0.1);
-                               }
                                else
                                {
                                        advancetime = sys_ticrate.value;
index 480769be00f40d1247af0bb206621803cc5aa61d..d8250f658d74600d2d4d4c0fd9898dc371679491 100644 (file)
--- a/server.h
+++ b/server.h
@@ -443,7 +443,6 @@ extern cvar_t sv_debugmove;
 extern cvar_t sv_echobprint;
 extern cvar_t sv_edgefriction;
 extern cvar_t sv_entpatch;
-extern cvar_t sv_fixedframeratesingleplayer;
 extern cvar_t sv_freezenonclients;
 extern cvar_t sv_friction;
 extern cvar_t sv_gameplayfix_blowupfallenzombies;
index 7e560a544c8503cbaeba104c314d7227986880c3..23440b4dfdaf861b864eb2c3b821429906aceedf 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -96,7 +96,6 @@ cvar_t sv_debugmove = {CVAR_SERVER | CVAR_NOTIFY, "sv_debugmove", "0", "disables
 cvar_t sv_echobprint = {CVAR_SERVER | CVAR_SAVE, "sv_echobprint", "1", "prints gamecode bprint() calls to server console"};
 cvar_t sv_edgefriction = {CVAR_SERVER, "edgefriction", "1", "how much you slow down when nearing a ledge you might fall off, multiplier of sv_friction (Quake used 2, QuakeWorld used 1 due to a bug in physics code)"};
 cvar_t sv_entpatch = {CVAR_SERVER, "sv_entpatch", "1", "enables loading of .ent files to override entities in the bsp (for example Threewave CTF server pack contains .ent patch files enabling play of CTF on id1 maps)"};
-cvar_t sv_fixedframeratesingleplayer = {CVAR_SERVER, "sv_fixedframeratesingleplayer", "1", "allows you to use server-style timing system in singleplayer (don't run faster than sys_ticrate)"};
 cvar_t sv_freezenonclients = {CVAR_SERVER | CVAR_NOTIFY, "sv_freezenonclients", "0", "freezes time, except for players, allowing you to walk around and take screenshots of explosions"};
 cvar_t sv_friction = {CVAR_SERVER | CVAR_NOTIFY, "sv_friction","4", "how fast you slow down"};
 cvar_t sv_gameplayfix_blowupfallenzombies = {CVAR_SERVER, "sv_gameplayfix_blowupfallenzombies", "1", "causes findradius to detect SOLID_NOT entities such as zombies and corpses on the floor, allowing splash damage to apply to them"};
@@ -518,7 +517,6 @@ void SV_Init (void)
        Cvar_RegisterVariable (&sv_echobprint);
        Cvar_RegisterVariable (&sv_edgefriction);
        Cvar_RegisterVariable (&sv_entpatch);
-       Cvar_RegisterVariable (&sv_fixedframeratesingleplayer);
        Cvar_RegisterVariable (&sv_freezenonclients);
        Cvar_RegisterVariable (&sv_friction);
        Cvar_RegisterVariable (&sv_gameplayfix_blowupfallenzombies);