]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
input: limit cl_netrepeatinput to 3
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 Sep 2009 11:25:15 +0000 (11:25 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 Sep 2009 11:25:15 +0000 (11:25 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9178 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c

index dd5b17e9ae60623d2a9b64874179466fa9e4e2c7..be77aaafe42de23ea79d83fc2e2df28059a6a58e 100644 (file)
@@ -1785,7 +1785,7 @@ void CL_SendMove(void)
                case PROTOCOL_DARKPLACES6:
                case PROTOCOL_DARKPLACES7:
                        // set the maxusercmds variable to limit how many should be sent
-                       maxusercmds = bound(1, cl_netrepeatinput.integer + 1, CL_MAX_USERCMDS);
+                       maxusercmds = bound(1, cl_netrepeatinput.integer + 1, min(3, 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.cmd.predicted)
                                maxusercmds = 1;