From 1a825a4045c191944688d5d350dad36a513a2267 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Fri, 14 Sep 2018 10:18:46 +0200 Subject: [PATCH] Small fixes --- src/openrct2-ui/windows/TileInspector.cpp | 2 +- src/openrct2/world/Map.cpp | 2 +- src/openrct2/world/SmallScenery.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index f418762977..644691f9bb 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -2157,7 +2157,7 @@ static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo* case TILE_ELEMENT_TYPE_WALL: snprintf( buffer, sizeof(buffer), "%s (%s)", language_get_string(STR_TILE_INSPECTOR_WALL), - language_get_string(get_wall_entry(tileElement->AsSmallScenery()->GetEntryIndex())->name)); + language_get_string(get_wall_entry(tileElement->properties.wall.type)->name)); typeName = buffer; break; case TILE_ELEMENT_TYPE_LARGE_SCENERY: diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index faa73480d4..8d5f1a7e81 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -3459,7 +3459,7 @@ void map_obstruction_set_error_text(rct_tile_element* tileElement) } break; case TILE_ELEMENT_TYPE_WALL: - sceneryEntry = get_wall_entry(tileElement->AsSmallScenery()->GetEntryIndex()); + sceneryEntry = get_wall_entry(tileElement->properties.wall.type); errorStringId = STR_X_IN_THE_WAY; set_format_arg(0, rct_string_id, sceneryEntry->name); break; diff --git a/src/openrct2/world/SmallScenery.cpp b/src/openrct2/world/SmallScenery.cpp index 0aaa9dddfb..fd66554f2a 100644 --- a/src/openrct2/world/SmallScenery.cpp +++ b/src/openrct2/world/SmallScenery.cpp @@ -621,4 +621,4 @@ rct_scenery_entry* get_small_scenery_entry(int32_t entryIndex) result = (rct_scenery_entry*)obj->GetLegacyData(); } return result; -} \ No newline at end of file +}