summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;