mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r25717) -Fix: check for type of order before checking for refit type
This commit is contained in:
parent
26bcc8c77f
commit
1137e250a0
|
@ -2161,7 +2161,8 @@ void Vehicle::RefreshNextHopsStats()
|
||||||
* deadlocks due to vehicles waiting for cargo that isn't being routed,
|
* deadlocks due to vehicles waiting for cargo that isn't being routed,
|
||||||
* yet. That situation will not occur if the vehicle is actually
|
* yet. That situation will not occur if the vehicle is actually
|
||||||
* carrying a different cargo in the end. */
|
* 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;
|
was_refit = true;
|
||||||
CargoID new_cid = next->GetRefitCargo();
|
CargoID new_cid = next->GetRefitCargo();
|
||||||
RefitList::iterator refit_it = refit_capacities.begin();
|
RefitList::iterator refit_it = refit_capacities.begin();
|
||||||
|
|
Loading…
Reference in New Issue