diff --git a/src/openrct2/entity/EntityRegistry.cpp b/src/openrct2/entity/EntityRegistry.cpp index 1921aa3b82..8c27584cdd 100644 --- a/src/openrct2/entity/EntityRegistry.cpp +++ b/src/openrct2/entity/EntityRegistry.cpp @@ -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) diff --git a/src/openrct2/entity/EntityTweener.cpp b/src/openrct2/entity/EntityTweener.cpp index 9c9e1bb1cc..6676edab46 100644 --- a/src/openrct2/entity/EntityTweener.cpp +++ b/src/openrct2/entity/EntityTweener.cpp @@ -19,7 +19,7 @@ void EntityTweener::AddEntity(EntityBase* entity) { entity->RenderFlags &= ~EntityRenderFlags::kInvalidateTweening; - + Entities.push_back(entity); PrePos.emplace_back(entity->GetLocation()); }