1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 03:05:24 +01:00

Fix tweener leaving stale pixels on screen

This commit is contained in:
Michael Bernardi
2024-09-22 15:32:18 +10:00
parent 970848539d
commit 8875c75461

View File

@@ -97,6 +97,7 @@ void EntityTweener::Tween(float alpha)
if (posA == posB)
continue;
ent->Invalidate();
EntitySetCoordinates(
{ static_cast<int32_t>(std::round(posB.x * alpha + posA.x * inv)),
static_cast<int32_t>(std::round(posB.y * alpha + posA.y * inv)),
@@ -114,6 +115,7 @@ void EntityTweener::Restore()
if (ent == nullptr)
continue;
ent->Invalidate();
EntitySetCoordinates(PostPos[i], ent);
ent->Invalidate();
}