]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix detection of timeout-based lost packets.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Dec 2009 08:30:07 +0000 (08:30 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Dec 2009 08:30:07 +0000 (08:30 +0000)
Now movementloss detection beats all test cases:
- it is 0 in local games :P
- when temporarily setting 100% packetloss, PL and movementloss are about equal
- when permanently setting 50% packetloss, movementloss is about 25% (due to cl_netrepeatinput 1)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9663 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index eec2987043ffb7c9ff1f95bd3d6410b3c6c5d0a9..3f68714b15eab2cecf6277a7b437b8af3c79d4ff 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -628,8 +628,9 @@ void SV_ExecuteClientMoves(void)
                                        // count the move as LOST if we don't
                                        // execute it but it has higher
                                        // sequence count
-                                       if(move->sequence > host_client->movesequence)
-                                               host_client->movement_count[(move->sequence) % NETGRAPH_PACKETS] = -1;
+                                       if(host_client->movesequence)
+                                               if(move->sequence > host_client->movesequence)
+                                                       host_client->movement_count[(move->sequence) % NETGRAPH_PACKETS] = -1;
                                        continue;
                                }