mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Fix #20285: Workaround to disable tweening when updated from UI
This commit is contained in:
@@ -473,6 +473,13 @@ void EntityBase::MoveTo(const CoordsXYZ& newLocation)
|
||||
EntitySetCoordinates(loc, this);
|
||||
Invalidate(); // Invalidate new position.
|
||||
}
|
||||
|
||||
if (!gInUpdateCode)
|
||||
{
|
||||
// Make sure we don't tween when the position was modified outside of the
|
||||
// update loop.
|
||||
RenderFlags |= EntityRenderFlags::kInvalidateTweening;
|
||||
}
|
||||
}
|
||||
|
||||
void EntitySetCoordinates(const CoordsXYZ& entityPos, EntityBase* entity)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
void EntityTweener::AddEntity(EntityBase* entity)
|
||||
{
|
||||
entity->RenderFlags &= ~EntityRenderFlags::kInvalidateTweening;
|
||||
|
||||
|
||||
Entities.push_back(entity);
|
||||
PrePos.emplace_back(entity->GetLocation());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user