forked from mirror/OpenTTD
(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:
@@ -306,10 +306,8 @@ static void HandleShipLoading(Vehicle *v)
|
||||
case OT_LOADING: {
|
||||
if (--v->load_unload_time_rem != 0) return;
|
||||
|
||||
if (CanFillVehicle(v)) {
|
||||
LoadUnloadVehicle(v);
|
||||
return;
|
||||
}
|
||||
if (LoadUnloadVehicle(v)) return;
|
||||
|
||||
PlayShipSound(v);
|
||||
|
||||
Order b = v->current_order;
|
||||
|
Reference in New Issue
Block a user