summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-05-19 10:29:51 +0000
committerpeter1138 <peter1138@openttd.org>2007-05-19 10:29:51 +0000
commit60a2c5280eb927b092214a4e5e04d6752de97b81 (patch)
tree7695a039d4a66b3c13c8739596a9e721f46ff265 /src
parent7d4be11516e2ef80bcce2a61f08d1cf091401ef1 (diff)
downloadopenttd-60a2c5280eb927b092214a4e5e04d6752de97b81.tar.xz
(svn r9875) -Fix (r9828): Only set carriage capacity if the wagon has not been refitted.
Diffstat (limited to 'src')
-rw-r--r--src/train_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 3329f8d0a..e8437bece 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -221,7 +221,10 @@ void TrainConsistChanged(Vehicle* v)
}
}
- 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;