changeset 4708:c2d392f2cdb4 draft

(svn r6618) - After refitting a train, update its cached variables as they may change.
author peter1138 <peter1138@openttd.org>
date Mon, 02 Oct 2006 22:10:04 +0000
parents 9a3a0020af6f
children f13847fa498b
files train_cmd.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1842,6 +1842,9 @@
 
 	_returned_refit_capacity = num;
 
+	/* Update the train's cached variables */
+	if (flags & DC_EXEC) TrainConsistChanged(GetVehicle(p1));
+
 	return cost;
 }