From 8875c754613704bef88b9b4eb4fca4f147872c5f Mon Sep 17 00:00:00 2001 From: Michael Bernardi Date: Sun, 22 Sep 2024 15:32:18 +1000 Subject: [PATCH] Fix tweener leaving stale pixels on screen --- src/openrct2/entity/EntityTweener.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openrct2/entity/EntityTweener.cpp b/src/openrct2/entity/EntityTweener.cpp index bfaa87a24e..bfd40100a6 100644 --- a/src/openrct2/entity/EntityTweener.cpp +++ b/src/openrct2/entity/EntityTweener.cpp @@ -97,6 +97,7 @@ void EntityTweener::Tween(float alpha) if (posA == posB) continue; + ent->Invalidate(); EntitySetCoordinates( { static_cast(std::round(posB.x * alpha + posA.x * inv)), static_cast(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(); }