diff src/roadveh_cmd.cpp @ 11351:11acaad65229 draft

(svn r15701) -Fix [FS#2595]: Blame NewGRFs returning inconsistent information in purchase-list/after building before users have a chance to blame OpenTTD for incorrectly autorenewing/-replacing.
author frosch <frosch@openttd.org>
date Fri, 13 Mar 2009 21:28:40 +0000
parents fc99317cb85b
children 82c90cd591ab
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -275,10 +275,13 @@
 		InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
 		InvalidateWindowClassesData(WC_ROADVEH_LIST, 0);
 		InvalidateWindow(WC_COMPANY, v->owner);
-		if (IsLocalCompany())
+		if (IsLocalCompany()) {
 			InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Road window
+		}
 
 		GetCompany(_current_company)->num_engines[p1]++;
+
+		CheckConsistencyOfArticulatedVehicle(v);
 	}
 
 	return cost;