changeset 5303:ef5d09aa13b4 draft

(svn r7459) -Fix: make sure TrainConsistChanged() is called for the first vehicle of a chain after reffiting because free wagons present in depot can have the same type as the one bought and refitted by autoreplace
author glx <glx@openttd.org>
date Sat, 09 Dec 2006 20:14:26 +0000
parents a25ad94d2329
children a0ea47ce8def
files train_cmd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1892,7 +1892,7 @@
 	_returned_refit_capacity = num;
 
 	/* Update the train's cached variables */
-	if (flags & DC_EXEC) TrainConsistChanged(GetVehicle(p1));
+	if (flags & DC_EXEC) TrainConsistChanged(GetFirstVehicleInChain(GetVehicle(p1)));
 
 	return cost;
 }