mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #20285: Workaround to disable tweening when updated from UI
This commit is contained in:
parent
65b582afb0
commit
b3606566c4
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue