diff options
author | fonsinchen <fonsinchen@openttd.org> | 2013-06-07 22:12:39 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2013-06-07 22:12:39 +0000 |
commit | a1a96b2e8b6919a5e133b2f021672c3285ce9185 (patch) | |
tree | ce7f45cbe4b87a0e539c9c75bbac6da40cca2568 /src | |
parent | 4ed1de468323d54b82f9f277ef7e3ba40117ab30 (diff) | |
download | openttd-a1a96b2e8b6919a5e133b2f021672c3285ce9185.tar.xz |
(svn r25329) -Fix [FS#5582]: for refreshing next hops implicit orders are equivalent to explicit stopping orders
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 49e8eed01..50825d36d 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2125,7 +2125,7 @@ void Vehicle::RefreshNextHopsStats() /* Make sure the first order is a station order. */ first = this->orders.list->GetNextStoppingOrder(this, first, hops++); if (first == NULL) return; - } while (!first->IsType(OT_GOTO_STATION)); + } while (!first->IsType(OT_GOTO_STATION) && !first->IsType(OT_IMPLICIT)); hops = 0; const Order *cur = first; @@ -2181,7 +2181,7 @@ void Vehicle::RefreshNextHopsStats() } } - if (next->IsType(OT_GOTO_STATION)) { + if (next->IsType(OT_GOTO_STATION) || next->IsType(OT_IMPLICIT)) { StationID next_station = next->GetDestination(); Station *st = Station::GetIfValid(cur->GetDestination()); if (st != NULL && next_station != INVALID_STATION && next_station != st->index) { |