diff options
author | frosch <frosch@openttd.org> | 2011-01-31 20:44:15 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-01-31 20:44:15 +0000 |
commit | a97d52a29a990132a8a5e4dd60304483617cec50 (patch) | |
tree | 0d8d42d633feabb438f812cedf0534a3c665074e /src/ship_cmd.cpp | |
parent | 67a5cd0b185158ca4926c8cb45f1735a1001e00b (diff) | |
download | openttd-a97d52a29a990132a8a5e4dd60304483617cec50.tar.xz |
(svn r21933) -Codechange: Split cur_order_index into cur_auto_order_index and cur_real_order_index to keep track of the current real order in an unambiguous way.
-Fix [FS#4440]: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing.
-Fix: Various other issues with automatic orders, e.g. vehicles getting stuck with "no orders" when there are automatic orders at the end of the order list.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r-- | src/ship_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index f5a6ac640..6e733d360 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -234,7 +234,7 @@ TileIndex Ship::GetOrderStationLocation(StationID station) if (st->dock_tile != INVALID_TILE) { return TILE_ADD(st->dock_tile, ToTileIndexDiff(GetDockOffset(st->dock_tile))); } else { - this->IncrementOrderIndex(); + this->IncrementRealOrderIndex(); return 0; } } @@ -480,7 +480,7 @@ static void ShipController(Ship *v) /* We got within 3 tiles of our target buoy, so let's skip to our * next order */ UpdateVehicleTimetable(v, true); - v->IncrementOrderIndex(); + v->IncrementRealOrderIndex(); v->current_order.MakeDummy(); } else { /* Non-buoy orders really need to reach the tile */ @@ -500,7 +500,7 @@ static void ShipController(Ship *v) v->BeginLoading(); } else { // leave stations without docks right aways v->current_order.MakeLeaveStation(); - v->IncrementOrderIndex(); + v->IncrementRealOrderIndex(); } } } |