1
0
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:
rubidium
2007-05-06 14:59:01 +00:00
parent cf927a9792
commit abbaa1691e
7 changed files with 82 additions and 87 deletions

View File

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