(svn r16680) -Codechange: don't go through all the station unloading stuff when there is no vehicle at the station

This commit is contained in:
rubidium
2009-06-28 14:29:58 +00:00
parent ce55eda3e1
commit 5140f4261b

View File

@@ -1519,6 +1519,9 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
*/
void LoadUnloadStation(Station *st)
{
/* No vehicle is here... */
if (st->loading_vehicles.empty()) return;
int cargo_left[NUM_CARGO];
for (uint i = 0; i < NUM_CARGO; i++) cargo_left[i] = st->goods[i].cargo.Count();