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

Function TrackDesignSaveAddFootpath

src/openrct2/ride/TrackDesignSave.cpp:370–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370static TrackDesignAddStatus TrackDesignSaveAddFootpath(const CoordsXY& loc, PathElement* pathElement)
371{
372 auto pathEntry = TrackDesignSaveFootpathGetBestEntry(*pathElement);
373 if (!pathEntry.has_value())
374 {
375 return TrackDesignAddStatus::Fail(STR_UNSUPPORTED_OBJECT_FORMAT);
376 }
377
378 auto item = TrackDesignSaveCreateFootpathDesc(pathEntry.value(), loc, *pathElement);
379 TrackDesignSavePushTileElement(loc, reinterpret_cast<TileElement*>(pathElement));
380
381 _trackSavedTileElementsDesc.push_back(std::move(item));
382 return TrackDesignAddStatus::Success();
383}
384
385/**
386 *

Callers 1

Calls 6

FailFunction · 0.85
valueMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected