From: havoc Date: Sat, 3 Mar 2007 00:57:01 +0000 (+0000) Subject: server now executes predicted moves of more than 50ms as two separate moves like... X-Git-Tag: xonotic-v0.1.0preview~3481 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=83903eb7d63631e1b0be6395495903b2cf15d1fb;p=xonotic%2Fdarkplaces.git server now executes predicted moves of more than 50ms as two separate moves like QWSV does (the client prediction expects this) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6935 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_user.c b/sv_user.c index f4ea2cff..18878ec1 100644 --- 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;