]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
server now executes predicted moves of more than 50ms as two separate moves like...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Mar 2007 00:57:01 +0000 (00:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Mar 2007 00:57:01 +0000 (00:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6935 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index f4ea2cff108f05307edf58b408924779411d699f..18878ec16c55b5207625fa203fe449bc867cf048 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -584,8 +584,13 @@ void SV_ExecuteClientMoves(void)
                                // update ping time for qc to see while executing this move
                                host_client->ping = host_client->cmd.receivetime - host_client->cmd.time;
                                // the server and qc frametime values must be changed temporarily
-                               sv.frametime = moveframetime;
-                               prog->globals.server->frametime = moveframetime;
+                               prog->globals.server->frametime = sv.frametime = moveframetime;
+                               // if move is more than 50ms, split it into two moves (this matches QWSV behavior and the client prediction)
+                               if (sv.frametime > 0.05)
+                               {
+                                       prog->globals.server->frametime = sv.frametime = moveframetime * 0.5f;
+                                       SV_Physics_ClientEntity(host_client->edict);
+                               }
                                SV_Physics_ClientEntity(host_client->edict);
                                sv.frametime = oldframetime2;
                                prog->globals.server->frametime = oldframetime;