From da204ca17f10b7e101a4bae8b5de5f9c05474ee7 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 19 May 2007 10:29:51 +0000 Subject: (svn r9875) -Fix (r9828): Only set carriage capacity if the wagon has not been refitted. --- src/train_cmd.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/train_cmd.cpp') 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; -- cgit v1.2.3-54-g00ecf