From b220db4ebe9ab3b265c7239fc6e4a16f524632bc Mon Sep 17 00:00:00 2001 From: Leonard2 Date: Fri, 27 May 2016 23:32:23 +0200 Subject: [PATCH] Fixed: a layer's movements weren't interpolated in some cases The old position members would be incorrectly updated if a layer sets another layer's offsets and this layer ticks before the other --- src/p_pspr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index cc1deea0c..d918c40c5 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -219,6 +219,8 @@ void DPSprite::NewTick() while (pspr) { pspr->processPending = true; + pspr->oldx = pspr->x; + pspr->oldy = pspr->y; pspr = pspr->Next; } @@ -1328,9 +1330,6 @@ void player_t::TickPSprites() void DPSprite::Tick() { - oldx = x; - oldy = y; - if (processPending) { // drop tic count and possibly change state