(svn r7386) -Codechange r7385: moved deletion of the vehicle highlight from DeleteVehicle to the sell commands as they are not called as often

Also added a return to the window loop prevent looking at the rest of the windows once the right depot window is found
This commit is contained in:
bjarni
2006-12-05 22:59:42 +00:00
parent 686a0d7750
commit 4adc6ba4f8
6 changed files with 8 additions and 2 deletions

View File

@@ -283,6 +283,7 @@ int32 CmdSellRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
InvalidateWindow(WC_COMPANY, v->owner);
DeleteWindowById(WC_VEHICLE_VIEW, v->index);
ClearSlot(v);
DeleteDepotHighlightOfVehicle(v);
DeleteVehicle(v);
if (IsLocalPlayer()) InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Road);
}