mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-26 16:09:10 +00:00
(svn r3156) -Fix: removed some cases where autoreplace windows were redrawn when nothing was changed
due to the FOR_ALL_VEHICLES(), redrawing those windows are slow
This commit is contained in:
@@ -921,7 +921,8 @@ int32 CmdBuildShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
|
||||
RebuildVehicleLists();
|
||||
InvalidateWindow(WC_COMPANY, v->owner);
|
||||
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
|
||||
if (IsLocalPlayer())
|
||||
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
|
||||
}
|
||||
|
||||
return value;
|
||||
@@ -953,7 +954,8 @@ int32 CmdSellShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
InvalidateWindow(WC_COMPANY, v->owner);
|
||||
DeleteWindowById(WC_VEHICLE_VIEW, v->index);
|
||||
DeleteVehicle(v);
|
||||
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
|
||||
if (IsLocalPlayer())
|
||||
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
|
||||
}
|
||||
|
||||
return -(int32)v->value;
|
||||
|
Reference in New Issue
Block a user