(svn r6637) -Codechange: merged all (vehicle type)EnterDepot into VehicleEnterDepot()

This revealed duplicated code like aircraft lists got invalidated twice
   Moved invalidation of the vehicle detail window to VehicleServiceInDepot() as it should always be updated when serviced
This commit is contained in:
bjarni
2006-10-04 12:01:59 +00:00
parent 4204eb6674
commit db9cdd6749
10 changed files with 93 additions and 197 deletions

View File

@@ -2006,7 +2006,7 @@ static uint32 VehicleEnter_Track(Vehicle *v, TileIndex tile, int x, int y)
v->vehstatus |= VS_HIDDEN; /* hide it */
v->direction = ReverseDir(v->direction);
if (v->next == NULL)
TrainEnterDepot(v, tile);
VehicleEnterDepot(v);
v->tile = tile;
InvalidateWindow(WC_VEHICLE_DEPOT, tile);
return 4;