]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_input.c
allow non-integer framerates for q3 shader animmap commands
[xonotic/darkplaces.git] / cl_input.c
index 95321d6743f53d37c7b454e063a6a6d3ae6c6791..d629596066163e10ca9aa38c69ef0380fed35151 100644 (file)
@@ -1179,7 +1179,7 @@ void CL_ClientMovement_Replay(void)
        {
                cl.movement_time[1] = cl.movecmd[1].time;
                cl.movement_time[0] = cl.movecmd[0].time;
-               cl.movement_time[2] = cl.timenonlerp;
+               cl.movement_time[2] = cl.time;
                VectorCopy(cl.movement_origin, cl.movement_oldorigin);
                VectorCopy(s.origin, cl.movement_origin);
                VectorCopy(s.velocity, cl.movement_velocity);
@@ -1272,7 +1272,7 @@ void CL_SendMove(void)
                return;
 
 #if 0
-       if (cl_movement.integer && cls.signon == SIGNONS && cls.protocol != PROTOCOL_QUAKEWORLD)
+       if (cl.movement_predicted && cls.signon == SIGNONS && cls.protocol != PROTOCOL_QUAKEWORLD)
        {
                if (!cl.movement_needupdate)
                        return;
@@ -1290,7 +1290,7 @@ void CL_SendMove(void)
                lastsendtime = max(lastsendtime + packettime, realtime);
        }
 
-       cl.cmd.time = cls.protocol == PROTOCOL_QUAKEWORLD ? realtime : cl.timenonlerp;
+       cl.cmd.time = cls.protocol == PROTOCOL_QUAKEWORLD ? realtime : cl.time;
 
        buf.maxsize = sizeof(data);
        buf.cursize = 0;
@@ -1299,7 +1299,7 @@ void CL_SendMove(void)
        // conditions for sending a move:
        // if the move advances time or if the game is paused (in which case time
        // is not advancing)
-       if ((cl.cmd.time > cl.movecmd[0].time || cl.mtime[0] == cl.mtime[1]) && cls.signon == SIGNONS)
+       if ((cl.cmd.time > cl.movecmd[0].time || cl.mtime[0] <= cl.mtime[1]) && cls.signon == SIGNONS)
        {
                // send the movement message
                // PROTOCOL_QUAKE        clc_move = 16 bytes total
@@ -1388,7 +1388,7 @@ void CL_SendMove(void)
                                // configurable number of unacknowledged moves
                                maxusercmds = bound(1, cl_netinputpacketlosstolerance.integer + 1, CL_MAX_USERCMDS);
                                // when movement prediction is off, there's not much point in repeating old input as it will just be ignored
-                               if (!cl_movement.integer)
+                               if (!cl.movement_predicted)
                                        maxusercmds = 1;
                        }