summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-08-11 10:59:47 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-08-11 10:59:47 +0000
commit1137e250a075aa88a899d023ff031b149e3c9061 (patch)
tree49c35e84de453b834db8e47057480587c9261b6e /src/vehicle.cpp
parent26bcc8c77f4e364433ebf4065801a8f832f4cad2 (diff)
downloadopenttd-1137e250a075aa88a899d023ff031b149e3c9061.tar.xz
(svn r25717) -Fix: check for type of order before checking for refit type
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index a57834ec4..7d9a67924 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2161,7 +2161,8 @@ void Vehicle::RefreshNextHopsStats()
* deadlocks due to vehicles waiting for cargo that isn't being routed,
* yet. That situation will not occur if the vehicle is actually
* carrying a different cargo in the end. */
- if (next->IsRefit() && !next->IsAutoRefit()) {
+ if ((next->IsType(OT_GOTO_DEPOT) || next->IsType(OT_GOTO_STATION)) &&
+ next->IsRefit() && !next->IsAutoRefit()) {
was_refit = true;
CargoID new_cid = next->GetRefitCargo();
RefitList::iterator refit_it = refit_capacities.begin();