From b0a3fd82d9bf6e5c5d549b7ba2ef8c46e8773899 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 13 Jul 2020 12:35:49 +0200 Subject: [PATCH] Fix #12221: Map generation tool doesn't place any trees (#12222) --- distribution/changelog.txt | 1 + src/openrct2/world/MapGen.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index aee46f3234..fa67c6229e 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -45,6 +45,7 @@ - Fix: [#12093] Staff window tab animation was no longer updating. - Fix: [#12123] Long server descriptions are not cut off properly. - Fix: [#12211] Map Generator shows incorrect map sizes (e.g. "150 x 0"). +- Fix: [#12221] Map Generation tool doesn't place any trees. - Fix: RCT1 scenarios have more items in the object list than are present in the park or the research list. - Improved: [#6530] Allow water and land height changes on park borders. - Improved: [#11390] Build hash written to screenshot metadata. diff --git a/src/openrct2/world/MapGen.cpp b/src/openrct2/world/MapGen.cpp index c22a27abf5..6c056f5ec9 100644 --- a/src/openrct2/world/MapGen.cpp +++ b/src/openrct2/world/MapGen.cpp @@ -349,7 +349,7 @@ static void mapgen_place_trees() int32_t type = -1; auto* surfaceElement = map_get_surface_element_at(pos.ToCoordsXY()); - if (surfaceElement != nullptr) + if (surfaceElement == nullptr) continue; switch (surfaceElement->GetSurfaceStyle()) {