]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
do not send zero-length moves at >1000fps
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 Sep 2009 11:52:01 +0000 (11:52 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 Sep 2009 11:52:01 +0000 (11:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9179 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c

index be77aaafe42de23ea79d83fc2e2df28059a6a58e..abe87409f180b2f771a2fe9c7f6a117d1046b76d 100644 (file)
@@ -1658,6 +1658,10 @@ void CL_SendMove(void)
        // send input every frame in singleplayer
        if (cl.islocalgame)
                packettime = 0;
+
+       // do not send if we do not have anything useful to send
+       if(msecdelta <= 0)
+               return;
        // always send if buttons changed or an impulse is pending
        // even if it violates the rate limit!
        if (!cl.movecmd[0].impulse && (!cl_netimmediatebuttons.integer || cl.movecmd[0].buttons == cl.movecmd[1].buttons))