From 30631fc1a322e19bc019e36963c92d1638dfbb55 Mon Sep 17 00:00:00 2001 From: Dino Bollinger Date: Mon, 5 Oct 2020 16:46:05 +0200 Subject: [PATCH] Duke3D: Apply second camera smoothing pass only for short x/y distances. Fixes terminx/eduke32#100 --- source/duke3d/src/game.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 27885b080..7fef6dbb5 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -971,7 +971,8 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio) static vec3_t v3; - if (Bmemcmp(&pPlayer->pos, &pPlayer->opos, sizeof(vec3_t))) + if (Bmemcmp(&pPlayer->pos, &pPlayer->opos, sizeof(vec3_t)) + && (klabs(camVect.x - v3.x) < 512) && (klabs(camVect.y - v3.y) < 512)) camVect = { v3.x + ((camVect.x - v3.x) >> 1), v3.y + ((camVect.y - v3.y) >> 1), v3.z + ((camVect.z - v3.z) >> 1) }; v3 = camVect; -- GitLab