(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.

This commit is contained in:
frosch
2009-03-13 21:28:40 +00:00
parent e6353a1a22
commit 4129b418cc
8 changed files with 114 additions and 18 deletions

View File

@@ -275,10 +275,13 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
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;