cast time of received moves to float to prevent negative ping estimates when timer...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 14 Jan 2007 10:03:13 +0000 (10:03 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 14 Jan 2007 10:03:13 +0000 (10:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6691 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index 3d2e78c..eeb7f10 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -460,7 +460,7 @@ qboolean SV_ReadClientMove (void)
                move->sequence = MSG_ReadLong ();
        move->time = MSG_ReadFloat ();
        if (msg_badread) Con_Printf("SV_ReadClientMessage: badread at %s:%i\n", __FILE__, __LINE__);
-       move->receivetime = sv.time;
+       move->receivetime = (float)sv.time;
 
        // calculate average ping time
        host_client->ping = move->receivetime - move->time;