depot.h
changeset 3179 8ef3e8028af5
parent 3147 fc76d566a68e
child 3185 a9d0cdff7b84
--- a/depot.h	Fri Mar 10 17:01:51 2006 +0000
+++ b/depot.h	Sat Mar 11 09:10:46 2006 +0000
@@ -8,6 +8,7 @@
 
 #include "direction.h"
 #include "pool.h"
+#include "road_map.h"
 #include "tile.h"
 #include "variables.h"
 
@@ -102,10 +103,8 @@
 
 	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)) {