(svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf)

This commit is contained in:
peter1138
2007-06-27 20:40:20 +00:00
parent b9db0b8cf1
commit 85fb4eb94b
8 changed files with 12 additions and 10 deletions

View File

@@ -587,7 +587,7 @@ static CommandCost CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 fla
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
if (IsLocalPlayer()) {
InvalidateAutoreplaceWindow(VEH_TRAIN); // updates the replace Train window
InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
}
GetPlayer(_current_player)->num_engines[engine]++;
}
@@ -771,7 +771,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
if (IsLocalPlayer())
InvalidateAutoreplaceWindow(VEH_TRAIN); // updates the replace Train window
InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
GetPlayer(_current_player)->num_engines[p1]++;
}