early return from embark_update during an active search to improve performance

- embark-assistant.cpp: checking if a search is active, if so return early
develop
bseiller 2021-01-18 22:08:46 +01:00
parent e7b770b65a
commit 85fe05b723
1 changed files with 6 additions and 0 deletions

@ -57,6 +57,12 @@ namespace embark_assist {
//===============================================================================
void embark_update() {
// not updating the embark overlay during an active find/match/survey phase
// which leads to better performance
if (state != nullptr && state->match_iterator.active) {
return;
}
auto screen = Gui::getViewscreenByType<df::viewscreen_choose_start_sitest>(0);
embark_assist::defs::mid_level_tiles mlt;
embark_assist::survey::initiate(&mlt);