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

Function FootpathIsLegacyPathEntryOkay

src/openrct2-ui/windows/Footpath.cpp:2175–2186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2173 }
2174
2175 static bool FootpathIsLegacyPathEntryOkay(ObjectEntryIndex index)
2176 {
2177 bool showEditorPaths = (gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode);
2178 auto& objManager = GetContext()->GetObjectManager();
2179 auto footpathObj = objManager.GetLoadedObject<FootpathObject>(index);
2180 if (footpathObj != nullptr)
2181 {
2182 auto pathEntry = reinterpret_cast<FootpathEntry*>(footpathObj->GetLegacyData());
2183 return showEditorPaths || !(pathEntry->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR);
2184 }
2185 return false;
2186 }
2187
2188 static ObjectEntryIndex FootpathGetDefaultLegacyPath()
2189 {

Callers 2

Calls 2

GetContextFunction · 0.85
GetLegacyDataMethod · 0.45

Tested by

no test coverage detected