ai/default/default.c
changeset 3185 a9d0cdff7b84
parent 3184 118a520164e4
child 3196 5cec26c5ab75
equal deleted inserted replaced
3184:118a520164e4 3185:a9d0cdff7b84
     2 
     2 
     3 #include "../../stdafx.h"
     3 #include "../../stdafx.h"
     4 #include "../../openttd.h"
     4 #include "../../openttd.h"
     5 #include "../../functions.h"
     5 #include "../../functions.h"
     6 #include "../../map.h"
     6 #include "../../map.h"
       
     7 #include "../../rail_map.h"
     7 #include "../../road_map.h"
     8 #include "../../road_map.h"
     8 #include "../../tile.h"
     9 #include "../../tile.h"
     9 #include "../../player.h"
    10 #include "../../player.h"
    10 #include "../../tunnel_map.h"
    11 #include "../../tunnel_map.h"
    11 #include "../../vehicle.h"
    12 #include "../../vehicle.h"
  3623 				}
  3624 				}
  3624 			}
  3625 			}
  3625 		} else {
  3626 		} else {
  3626 			static const byte _depot_bits[] = {0x19,0x16,0x25,0x2A};
  3627 			static const byte _depot_bits[] = {0x19,0x16,0x25,0x2A};
  3627 
  3628 
  3628 			m5 &= 3;
  3629 			DiagDirection dir = GetRailDepotDirection(tile);
  3629 			if (GetRailTrackStatus(tile + TileOffsByDir(m5)) & _depot_bits[m5])
  3630 
       
  3631 			if (GetRailTrackStatus(tile + TileOffsByDir(dir)) & _depot_bits[dir])
  3630 				return;
  3632 				return;
  3631 
  3633 
  3632 			DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
  3634 			DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
  3633 		}
  3635 		}
  3634 	} else if (IsTileType(tile, MP_STREET)) {
  3636 	} else if (IsTileType(tile, MP_STREET)) {