Fix TerrainEdgeObject::GetById returning surface instead

This commit is contained in:
Hielke Morsink committed 2022-05-15 00:01:55 +02:00
1 parent 71318dbcb3
commit 52eeb702e0
1 file changed
+1 -1
+1 -1
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;
}