summaryrefslogtreecommitdiff
path: root/depot.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-11 09:10:46 +0000
committertron <tron@openttd.org>2006-03-11 09:10:46 +0000
commit929fae7b685a21e2337736084e42731f84cf8cba (patch)
tree5a49ef225f58c5e3ddaaa72935a0c65e716fe884 /depot.h
parent6892e04d14a78818c6cdbf71b0d1f92996a10bc6 (diff)
downloadopenttd-929fae7b685a21e2337736084e42731f84cf8cba.tar.xz
(svn r3816) Use existing accessors
Diffstat (limited to 'depot.h')
-rw-r--r--depot.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/depot.h b/depot.h
index 6af2dc37f..a3efdf233 100644
--- a/depot.h
+++ b/depot.h
@@ -8,6 +8,7 @@
#include "direction.h"
#include "pool.h"
+#include "road_map.h"
#include "tile.h"
#include "variables.h"
@@ -102,10 +103,8 @@ static inline DiagDirection GetDepotDirection(TileIndex tile, TransportType type
switch (type)
{
- case TRANSPORT_RAIL:
- case TRANSPORT_ROAD:
- /* Rail and road store a diagonal direction in bits 0 and 1 */
- return (DiagDirection)GB(_m[tile].m5, 0, 2);
+ case TRANSPORT_RAIL: return (DiagDirection)GB(_m[tile].m5, 0, 2);
+ case TRANSPORT_ROAD: return GetRoadDepotDirection(tile);
case TRANSPORT_WATER:
/* Water is stubborn, it stores the directions in a different order. */
switch (GB(_m[tile].m5, 0, 2)) {