equal
deleted
inserted
replaced
1059 if (IS_HUMAN_PLAYER(v->owner) && new_cid != v->cargo_type) { |
1059 if (IS_HUMAN_PLAYER(v->owner) && new_cid != v->cargo_type) { |
1060 cost = _price.ship_base >> 7; |
1060 cost = _price.ship_base >> 7; |
1061 } |
1061 } |
1062 |
1062 |
1063 if (flags & DC_EXEC) { |
1063 if (flags & DC_EXEC) { |
1064 v->cargo_count = 0; |
1064 v->cargo_count = (v->cargo_type == new_cid) ? min(v->cargo_cap, v->cargo_count) : 0; |
1065 v->cargo_type = new_cid; |
1065 v->cargo_type = new_cid; |
1066 v->cargo_subtype = new_subtype; |
1066 v->cargo_subtype = new_subtype; |
1067 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
1067 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
1068 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |
1068 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |
1069 RebuildVehicleLists(); |
1069 RebuildVehicleLists(); |