(svn r9875) -Fix (r9828): Only set carriage capacity if the wagon has not been refitted.
--- a/src/train_cmd.cpp Sat May 19 09:40:18 2007 +0000
+++ b/src/train_cmd.cpp Sat May 19 10:29:51 2007 +0000
@@ -221,7 +221,10 @@
}
}
- u->cargo_cap = GetVehicleProperty(u, 0x14, rvi_u->capacity);
+ if (u->cargo_type == rvi_u->cargo_type && u->cargo_subtype == 0) {
+ /* Set cargo capacity if we've not been refitted */
+ u->cargo_cap = GetVehicleProperty(u, 0x14, rvi_u->capacity);
+ }
/* check the vehicle length (callback) */
uint16 veh_len = CALLBACK_FAILED;