From 115b8a439ffb3b43575f8c19003f9e402408a94e Mon Sep 17 00:00:00 2001 From: bseiller Date: Sun, 31 Jan 2021 13:58:17 +0100 Subject: [PATCH] fixing use of wrong indices, discovered during refactoring in survey::survey_mid_level_tile - survey.cpp: replacing faulty repeated nested vector access (due to wrong indices) with the existing region_map_entry reference --- plugins/embark-assistant/survey.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/embark-assistant/survey.cpp b/plugins/embark-assistant/survey.cpp index 2610772f6..4d5e16082 100644 --- a/plugins/embark-assistant/survey.cpp +++ b/plugins/embark-assistant/survey.cpp @@ -985,8 +985,8 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data elevation = 98; } - if ((world_data->geo_biomes[world_data->region_map[x][y].geo_index]->unk1 == 4 || - world_data->geo_biomes[world_data->region_map[x][y].geo_index]->unk1 == 5) && + if ((world_data->geo_biomes[region_map_entry.geo_index]->unk1 == 4 || + world_data->geo_biomes[region_map_entry.geo_index]->unk1 == 5) && details->unk12e8 < 500) { max_soil_depth = 0; }