mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-26 16:09:10 +00:00
(svn r14578) -Fix (r2389, r10811)[FS#Vikthor]: Allow capacity callbacks (15, 36) to return zero capacity.
This commit is contained in:
@@ -2085,8 +2085,6 @@ CommandCost CmdRefitRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (capacity == 0) continue;
|
|
||||||
|
|
||||||
total_capacity += capacity;
|
total_capacity += capacity;
|
||||||
|
|
||||||
if (IsHumanCompany(v->owner) && new_cid != v->cargo_type) {
|
if (IsHumanCompany(v->owner) && new_cid != v->cargo_type) {
|
||||||
|
@@ -2080,7 +2080,6 @@ CommandCost CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amount != 0) {
|
|
||||||
if (new_cid != v->cargo_type) {
|
if (new_cid != v->cargo_type) {
|
||||||
cost.AddCost(GetRefitCost(v->engine_type));
|
cost.AddCost(GetRefitCost(v->engine_type));
|
||||||
}
|
}
|
||||||
@@ -2096,7 +2095,6 @@ CommandCost CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
|
|||||||
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
|
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} while ((v = v->Next()) != NULL && !only_this);
|
} while ((v = v->Next()) != NULL && !only_this);
|
||||||
|
|
||||||
_returned_refit_capacity = num;
|
_returned_refit_capacity = num;
|
||||||
|
Reference in New Issue
Block a user