From 4adc6ba4f853d1b11994948f2653ddb618da36bb Mon Sep 17 00:00:00 2001 From: bjarni Date: Tue, 5 Dec 2006 22:59:42 +0000 Subject: (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 --- roadveh_cmd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'roadveh_cmd.c') diff --git a/roadveh_cmd.c b/roadveh_cmd.c index d9e365508..c53dbeb97 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -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); } -- cgit v1.2.3-54-g00ecf