Navigation Menu

Skip to content

Commit

Permalink
FIX: Don't reset the path explorer when not necessary
Browse files Browse the repository at this point in the history
This will allow the path explorer to complete path exploration
for all categories. If it introduces any new bugs, they need to
be fixed more delicately than before.
  • Loading branch information
andrewcarlotti committed Apr 27, 2019
1 parent 0bbfa3b commit 7cf8454
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion simdepot.cc
Expand Up @@ -195,7 +195,7 @@ void depot_t::convoi_arrived(convoihandle_t acnv, bool fpl_adjust)
#ifdef MULTI_THREAD
world()->await_path_explorer();
#endif
path_explorer_t::refresh_all_categories(true);
path_explorer_t::refresh_all_categories(false);
}

// Clean up the vehicles -- get rid of freight, etc. Do even when loading, just in case.
Expand Down
2 changes: 1 addition & 1 deletion simtool.cc
Expand Up @@ -7388,7 +7388,7 @@ const char *tool_stop_mover_t::do_work( player_t *player, const koord3d &last_po
#ifdef MULTI_THREAD
world()->await_path_explorer();
#endif
path_explorer_t::refresh_all_categories(true);
path_explorer_t::refresh_all_categories(false);
}
return NULL;
}
Expand Down
8 changes: 4 additions & 4 deletions simworld.cc
Expand Up @@ -2834,7 +2834,7 @@ void karte_t::enlarge_map(settings_t const* sets, sint8 const* const h_field)
await_path_explorer();
#endif
// Modified by : Knightly
path_explorer_t::refresh_all_categories(true);
path_explorer_t::refresh_all_categories(false);

set_schedule_counter();

Expand Down Expand Up @@ -4451,7 +4451,7 @@ DBG_MESSAGE( "karte_t::rotate90()", "called" );

// finally recalculate schedules for goods in transit ...
// Modified by : Knightly
path_explorer_t::refresh_all_categories(true);
path_explorer_t::refresh_all_categories(false);

set_dirty();
}
Expand Down Expand Up @@ -5129,7 +5129,7 @@ void karte_t::new_month()

// Added by : Knightly
// Note : This should be done after all lines and convoys have rolled their statistics
path_explorer_t::refresh_all_categories(true);
path_explorer_t::refresh_all_categories(false);
}


Expand Down Expand Up @@ -5685,7 +5685,7 @@ void karte_t::step()
// This is not the computationally intensive bit of the path explorer.
if((steps % get_settings().get_reroute_check_interval_steps()) == 0)
{
path_explorer_t::refresh_all_categories(true);
path_explorer_t::refresh_all_categories(false);
}

INT_CHECK("karte_t::step 8");
Expand Down

0 comments on commit 7cf8454

Please sign in to comment.