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

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 15 years ago
parent 1e09854cb7
commit eb4380f5ea

@ -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();

Loading…
Cancel
Save