MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / TrackDesignLoadSceneryObjects

Function TrackDesignLoadSceneryObjects

src/openrct2/ride/TrackDesign.cpp:627–646  ·  view source on GitHub ↗

* * rct2: 0x006ABDB0 */

Source from the content-addressed store, hash-verified

625 * rct2: 0x006ABDB0
626 */
627static void TrackDesignLoadSceneryObjects(const TrackDesign& td)
628{
629 auto& objectManager = GetContext()->GetObjectManager();
630 objectManager.UnloadAllTransient();
631
632 // Load ride object
633 if (td.trackAndVehicle.vehicleObject.HasValue())
634 {
635 objectManager.LoadObject(td.trackAndVehicle.vehicleObject);
636 }
637
638 // Load scenery objects
639 for (const auto& scenery : td.sceneryElements)
640 {
641 if (scenery.sceneryObject.HasValue())
642 {
643 objectManager.LoadObject(scenery.sceneryObject);
644 }
645 }
646}
647
648struct TrackSceneryEntry
649{

Callers 1

TrackDesignDrawPreviewFunction · 0.85

Calls 4

GetContextFunction · 0.85
UnloadAllTransientMethod · 0.80
HasValueMethod · 0.45
LoadObjectMethod · 0.45

Tested by

no test coverage detected