(svn r16785) -Codechange: make ships going to buoys use OT_GOTO_WAYPOINT too

This commit is contained in:
rubidium
2009-07-10 18:30:02 +00:00
parent c654dedb28
commit 3b8d0621a2
6 changed files with 68 additions and 16 deletions

View File

@@ -626,8 +626,7 @@ static void ShipController(Ship *v)
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
} else if (v->dest_tile != 0) {
/* We have a target, let's see if we reached it... */
if (v->current_order.IsType(OT_GOTO_STATION) &&
Station::Get(v->current_order.GetDestination())->IsBuoy() &&
if (v->current_order.IsType(OT_GOTO_WAYPOINT) &&
DistanceManhattan(v->dest_tile, gp.new_tile) <= 3) {
/* We got within 3 tiles of our target buoy, so let's skip to our
* next order */