From 83903eb7d63631e1b0be6395495903b2cf15d1fb Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 3 Mar 2007 00:57:01 +0000 Subject: [PATCH] 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 --- sv_user.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; -- 2.39.2