(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

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