mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
This commit is contained in:
parent
106d5c3715
commit
495bc4ecf4
@ -452,7 +452,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
RebuildVehicleLists();
|
RebuildVehicleLists();
|
||||||
InvalidateWindow(WC_COMPANY, v->owner);
|
InvalidateWindow(WC_COMPANY, v->owner);
|
||||||
if (IsLocalPlayer())
|
if (IsLocalPlayer())
|
||||||
InvalidateAutoreplaceWindow(VEH_AIRCRAFT, v->group_id); //updates the replace Aircraft window
|
InvalidateAutoreplaceWindow(v->engine_type, v->group_id); //updates the replace Aircraft window
|
||||||
|
|
||||||
GetPlayer(_current_player)->num_engines[p1]++;
|
GetPlayer(_current_player)->num_engines[p1]++;
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
RebuildVehicleLists();
|
RebuildVehicleLists();
|
||||||
InvalidateWindow(WC_COMPANY, v->owner);
|
InvalidateWindow(WC_COMPANY, v->owner);
|
||||||
if (IsLocalPlayer())
|
if (IsLocalPlayer())
|
||||||
InvalidateAutoreplaceWindow(VEH_ROAD, v->group_id); // updates the replace Road window
|
InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Road window
|
||||||
|
|
||||||
GetPlayer(_current_player)->num_engines[p1]++;
|
GetPlayer(_current_player)->num_engines[p1]++;
|
||||||
}
|
}
|
||||||
|
@ -897,7 +897,7 @@ CommandCost CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
RebuildVehicleLists();
|
RebuildVehicleLists();
|
||||||
InvalidateWindow(WC_COMPANY, v->owner);
|
InvalidateWindow(WC_COMPANY, v->owner);
|
||||||
if (IsLocalPlayer())
|
if (IsLocalPlayer())
|
||||||
InvalidateAutoreplaceWindow(VEH_SHIP, v->group_id); // updates the replace Ship window
|
InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Ship window
|
||||||
|
|
||||||
GetPlayer(_current_player)->num_engines[p1]++;
|
GetPlayer(_current_player)->num_engines[p1]++;
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ static CommandCost CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 fla
|
|||||||
|
|
||||||
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
|
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
|
||||||
if (IsLocalPlayer()) {
|
if (IsLocalPlayer()) {
|
||||||
InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
|
InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
|
||||||
}
|
}
|
||||||
GetPlayer(_current_player)->num_engines[engine]++;
|
GetPlayer(_current_player)->num_engines[engine]++;
|
||||||
}
|
}
|
||||||
@ -772,7 +772,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
|
|||||||
RebuildVehicleLists();
|
RebuildVehicleLists();
|
||||||
InvalidateWindow(WC_COMPANY, v->owner);
|
InvalidateWindow(WC_COMPANY, v->owner);
|
||||||
if (IsLocalPlayer())
|
if (IsLocalPlayer())
|
||||||
InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
|
InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
|
||||||
|
|
||||||
GetPlayer(_current_player)->num_engines[p1]++;
|
GetPlayer(_current_player)->num_engines[p1]++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user