Change: Add path cache for ships.

This commit is contained in:
Peter Nelson
2019-01-14 23:33:42 +00:00
committed by PeterN
parent 1c725fce47
commit 81330b8d6e
12 changed files with 67 additions and 21 deletions

View File

@@ -1980,7 +1980,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags)
FOR_ALL_ROADVEHICLES(v) {
if (v->First() == v && v->current_order.IsType(OT_GOTO_STATION) &&
v->dest_tile == tile) {
v->dest_tile = v->GetOrderStationLocation(st->index);
v->SetDestTile(v->GetOrderStationLocation(st->index));
}
}
@@ -2604,7 +2604,7 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags)
}
if (s->dest_tile == docking_location) {
s->dest_tile = 0;
s->SetDestTile(0);
s->current_order.Free();
}
}