From 0cd736b48736d6bf8ded7e18acb8eacdc40baf29 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Mon, 13 Oct 2014 17:09:29 +1300 Subject: [PATCH] Prevent lerping when tic duplication not 1 Network dup makes player prediction inaccurate --- src/p_user.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_user.cpp b/src/p_user.cpp index abf9256f7..b40e44424 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -2685,7 +2685,7 @@ void P_PredictPlayer (player_t *player) player->mo == NULL || player != &players[consoleplayer] || player->playerstate != PST_LIVE || - //!netgame || + !netgame || /*player->morphTics ||*/ (player->cheats & CF_PREDICTING)) { @@ -2761,7 +2761,7 @@ void P_PredictPlayer (player_t *player) act->BlockNode = NULL; // Values too small to be usable for lerping can be considered "off". - bool CanLerp = !(cl_predict_lerpscale < 0.01f), DoLerp = false, NoInterpolateOld = R_GetViewInterpolationStatus(); + bool CanLerp = (!(cl_predict_lerpscale < 0.01f) && (ticdup == 1)), DoLerp = false, NoInterpolateOld = R_GetViewInterpolationStatus(); for (int i = gametic; i < maxtic; ++i) { if (!NoInterpolateOld)