From 161df6fbab321a2cc78e0aacbe9d62104921e8c4 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Mon, 14 Aug 2017 16:19:21 +0200 Subject: Fix a few errors in player extrapolation. --- src/game/g_active.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/g_active.c b/src/game/g_active.c index c1cc9f0..e1a7153 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1634,14 +1634,14 @@ static void ClientExtrapolate(gentity_t *ent) } VectorSubtract(pos2->origin, pos1->origin, dxdt); - VectorScale(dxdt, pos2->time - pos1->time, dxdt); + VectorScale(dxdt, 1.0f / time_delta, dxdt); if (flags & 16) time_since = level.time - pos2->client_time; else time_since = level.time - pos2->time; - VectorMA(pos1->origin, time_delta, dxdt, ent->s.pos.trBase); + VectorMA(pos1->origin, time_since, dxdt, ent->s.pos.trBase); if (g_debugExtrapolation.integer) { Com_Printf("Extrapolated player %i:\n", (int)(ent - g_entities)); -- cgit