mirror of https://github.com/OpenTTD/OpenTTD.git
(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:
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…
Reference in New Issue