Prevent lerping when tic duplication not 1

Network dup makes player prediction inaccurate
This commit is contained in:
Edward Richardson 2014-10-13 17:09:29 +13:00
parent 3e4446e46b
commit 0cd736b487

View file

@ -2685,7 +2685,7 @@ void P_PredictPlayer (player_t *player)
player->mo == NULL || player->mo == NULL ||
player != &players[consoleplayer] || player != &players[consoleplayer] ||
player->playerstate != PST_LIVE || player->playerstate != PST_LIVE ||
//!netgame || !netgame ||
/*player->morphTics ||*/ /*player->morphTics ||*/
(player->cheats & CF_PREDICTING)) (player->cheats & CF_PREDICTING))
{ {
@ -2761,7 +2761,7 @@ void P_PredictPlayer (player_t *player)
act->BlockNode = NULL; act->BlockNode = NULL;
// Values too small to be usable for lerping can be considered "off". // 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) for (int i = gametic; i < maxtic; ++i)
{ {
if (!NoInterpolateOld) if (!NoInterpolateOld)