mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-27 16:39:09 +00:00
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
This commit is contained in:
@@ -2537,10 +2537,7 @@ static void HandleTrainLoading(Vehicle *v, bool mode)
|
||||
|
||||
if (--v->load_unload_time_rem) return;
|
||||
|
||||
if (CanFillVehicle(v)) {
|
||||
LoadUnloadVehicle(v);
|
||||
return;
|
||||
}
|
||||
if (LoadUnloadVehicle(v)) return;
|
||||
|
||||
TrainPlayLeaveStationSound(v);
|
||||
|
||||
|
Reference in New Issue
Block a user