From adfbc32cecfb266555682d2fbd11e70b557896ed Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 6 Apr 2013 18:57:18 +0000 Subject: [PATCH] (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) --- src/economy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/economy.cpp b/src/economy.cpp index e32ffa3dc8..8a4e53520b 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); } } }