Changeset - r6888:f2ab5d0e6596
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-06-13 09:12:10
rubidium@openttd.org
(svn r10131) -Fix [FS#810]: when removing a dock, a ship will always try to reach the old location of the dock even when it cannot anymore because it the old location of the dock is now land instead of water.
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/ship_cmd.cpp
Show inline comments
 
@@ -280,7 +280,8 @@ static void ProcessShipOrder(Vehicle *v)
 

	
 
	if (order->type  == v->current_order.type &&
 
			order->flags == v->current_order.flags &&
 
			order->dest  == v->current_order.dest)
 
			order->dest  == v->current_order.dest &&
 
			(order->type != OT_GOTO_STATION || GetStation(order->dest)->dock_tile != 0))
 
		return;
 

	
 
	v->current_order = *order;
 
@@ -294,6 +295,8 @@ static void ProcessShipOrder(Vehicle *v)
 
		st = GetStation(order->dest);
 
		if (st->dock_tile != 0) {
 
			v->dest_tile = TILE_ADD(st->dock_tile, ToTileIndexDiff(GetDockOffset(st->dock_tile)));
 
		} else {
 
			v->cur_order_index++;
 
		}
 
	} else if (order->type == OT_GOTO_DEPOT) {
 
		v->dest_tile = GetDepot(order->dest)->xy;
0 comments (0 inline, 0 general)