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
This commit is contained in:
Leonard2 2016-05-27 23:32:23 +02:00
parent bca9829950
commit b220db4ebe
1 changed files with 2 additions and 3 deletions

View File

@ -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