mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r13593) -Fix [FS#2095](r13524): sorting by cargo capacity was broken
This commit is contained in:
parent
5e21504107
commit
3d56c07440
@ -549,7 +549,7 @@ static int CDECL VehicleCargoSorter(const Vehicle* const *a, const Vehicle* cons
|
|||||||
{
|
{
|
||||||
const Vehicle *v;
|
const Vehicle *v;
|
||||||
AcceptedCargo diff;
|
AcceptedCargo diff;
|
||||||
MemSetT(diff, 0);
|
memset(diff, 0, sizeof(diff));
|
||||||
|
|
||||||
/* Append the cargo of the connected weagons */
|
/* Append the cargo of the connected weagons */
|
||||||
for (v = *a; v != NULL; v = v->Next()) diff[v->cargo_type] += v->cargo_cap;
|
for (v = *a; v != NULL; v = v->Next()) diff[v->cargo_type] += v->cargo_cap;
|
||||||
|
Loading…
Reference in New Issue
Block a user