summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-04-06 18:57:18 +0000
committerrubidium <rubidium@openttd.org>2013-04-06 18:57:18 +0000
commit2b6669a7fffa237ddd818b0a461eb96081f15dd9 (patch)
treedc2a785df2a1ec6986ae69d0ccd9d5c57937ddab
parent2d67f0797569b4ebe56e11544706fdcd7f4a3bcb (diff)
downloadopenttd-2b6669a7fffa237ddd818b0a461eb96081f15dd9.tar.xz
(svn r25156) -Fix [FS#5495, FS#5497]: if a vehicle had some cargo, and it would try to unload without actually unloading, the vehicle would just not load any cargo at the station (fonsinchen)
-rw-r--r--src/economy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index e32ffa3dc..8a4e53520 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1220,7 +1220,7 @@ void PrepareUnload(Vehicle *front_v)
v->cargo.Stage(
HasBit(Station::Get(front_v->last_station_visited)->goods[v->cargo_type].acceptance_pickup, GoodsEntry::GES_ACCEPTANCE),
front_v->last_station_visited, front_v->current_order.GetUnloadType());
- SetBit(v->vehicle_flags, VF_CARGO_UNLOADING);
+ if (v->cargo.UnloadCount() > 0) SetBit(v->vehicle_flags, VF_CARGO_UNLOADING);
}
}
}