summaryrefslogtreecommitdiff
path: root/src/vehicle_func.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-28 19:48:04 +0000
committerrubidium <rubidium@openttd.org>2011-12-28 19:48:04 +0000
commit8d125a60ce2d97be1ce05c713cb3cdcc248a36dd (patch)
tree3087cbbefc1cbaca5c2f350f3780d6a639a32423 /src/vehicle_func.h
parent660e5b286fe98d4cb4b80f4d5e834ac76df6f8a8 (diff)
downloadopenttd-8d125a60ce2d97be1ce05c713cb3cdcc248a36dd.tar.xz
(svn r23683) -Fix [FS#4912]-ish: when fitting another engine the cargo capacity of wagons could become lower, causing them to contain more than they should. This caused the cargo transfer from the replaced parts to put even more stuff in the already full wagon. Prevent this from happening by reducing the amount of cargo in the vehicle to the capacity when moving vehicles/wagons around, or when autoreplacing
Diffstat (limited to 'src/vehicle_func.h')
-rw-r--r--src/vehicle_func.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle_func.h b/src/vehicle_func.h
index a41f3c466..283d420a4 100644
--- a/src/vehicle_func.h
+++ b/src/vehicle_func.h
@@ -173,4 +173,6 @@ void ReleaseDisastersTargetingVehicle(VehicleID vehicle);
typedef SmallVector<VehicleID, 2> VehicleSet;
void GetVehicleSet(VehicleSet &set, Vehicle *v, uint8 num_vehicles);
+void CheckCargoCapacity(Vehicle *v);
+
#endif /* VEHICLE_FUNC_H */