Change 81330b8d6e: Cached path only needs to be cleared if it was found to be invalid.

This commit is contained in:
Peter Nelson 2019-01-20 09:07:27 +00:00 committed by Michael Lutz
parent 4daaec1a94
commit f35b135e17

View File

@ -484,9 +484,9 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr
}
/* Cached path is invalid so continue with pathfinder. */
v->path.clear();
}
v->path.clear();
switch (_settings_game.pf.pathfinder_for_ships) {
case VPF_OPF: track = OPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break;
case VPF_NPF: track = NPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break;