(svn r3831) Add and use GetRailDepotDirection()

This commit is contained in:
tron
2006-03-12 16:13:16 +00:00
parent 78083f0da7
commit 12d252d9bd
6 changed files with 19 additions and 10 deletions

View File

@@ -4,6 +4,7 @@
#include "../../openttd.h"
#include "../../functions.h"
#include "../../map.h"
#include "../../rail_map.h"
#include "../../road_map.h"
#include "../../tile.h"
#include "../../player.h"
@@ -3625,8 +3626,9 @@ pos_3:
} else {
static const byte _depot_bits[] = {0x19,0x16,0x25,0x2A};
m5 &= 3;
if (GetRailTrackStatus(tile + TileOffsByDir(m5)) & _depot_bits[m5])
DiagDirection dir = GetRailDepotDirection(tile);
if (GetRailTrackStatus(tile + TileOffsByDir(dir)) & _depot_bits[dir])
return;
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);