1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Fix TerrainEdgeObject::GetById returning surface instead

This commit is contained in:
Hielke Morsink
2022-05-15 00:01:55 +02:00
parent 71318dbcb3
commit 52eeb702e0

View File

@@ -64,6 +64,6 @@ void TerrainEdgeObject::ReadJson(IReadObjectContext* context, json_t& root)
TerrainEdgeObject* TerrainEdgeObject::GetById(ObjectEntryIndex entryIndex)
{
auto& objMgr = OpenRCT2::GetContext()->GetObjectManager();
auto obj = objMgr.GetLoadedObject(ObjectType::TerrainSurface, entryIndex);
auto obj = objMgr.GetLoadedObject(ObjectType::TerrainEdge, entryIndex);
return obj != nullptr ? static_cast<TerrainEdgeObject*>(obj) : nullptr;
}