1
0
Fork 0

(svn r23745) -Fix (r23087): If autorefit fails, count the vehicle capacity nevertheless, if it is already carrying the right thing.

release/1.2
frosch 2012-01-03 23:08:15 +00:00
parent 7ff95b9e97
commit 00ec5da361
1 changed files with 6 additions and 0 deletions

View File

@ -357,6 +357,12 @@ static CommandCost RefitVehicle(Vehicle *v, bool only_this, uint8 num_vehicles,
/* Sorry, auto-refitting not allowed, subtract the cargo amount again from the total. */ /* Sorry, auto-refitting not allowed, subtract the cargo amount again from the total. */
total_capacity -= amount; total_capacity -= amount;
total_mail_capacity -= mail_capacity; total_mail_capacity -= mail_capacity;
if (v->cargo_type == new_cid) {
/* Add the old capacity nevertheless, if the cargo matches */
total_capacity += v->cargo_cap;
if (v->type == VEH_AIRCRAFT) total_mail_capacity += v->Next()->cargo_cap;
}
continue; continue;
} }
cost.AddCost(refit_cost); cost.AddCost(refit_cost);