equal
deleted
inserted
replaced
801 |
801 |
802 bool in_motion = v->First()->current_order.type != OT_LOADING; |
802 bool in_motion = v->First()->current_order.type != OT_LOADING; |
803 |
803 |
804 totalsets = in_motion ? group->g.real.num_loaded : group->g.real.num_loading; |
804 totalsets = in_motion ? group->g.real.num_loaded : group->g.real.num_loading; |
805 |
805 |
806 if (v->cargo.Count() == v->cargo_cap || totalsets == 1) { |
806 if (v->cargo.Count() >= v->cargo_cap || totalsets == 1) { |
807 set = totalsets - 1; |
807 set = totalsets - 1; |
808 } else if (v->cargo.Empty() || totalsets == 2) { |
808 } else if (v->cargo.Empty() || totalsets == 2) { |
809 set = 0; |
809 set = 0; |
810 } else { |
810 } else { |
811 set = v->cargo.Count() * (totalsets - 2) / max((uint16)1, v->cargo_cap) + 1; |
811 set = v->cargo.Count() * (totalsets - 2) / max((uint16)1, v->cargo_cap) + 1; |