depot.h
changeset 2493 d834d0c1502a
parent 2186 461a2aff3486
child 2952 6a26eeda9679
--- a/depot.h	Wed Oct 05 04:00:39 2005 +0000
+++ b/depot.h	Wed Oct 05 07:20:26 2005 +0000
@@ -104,10 +104,10 @@
 		case TRANSPORT_RAIL:
 		case TRANSPORT_ROAD:
 			/* Rail and road store a diagonal direction in bits 0 and 1 */
-			return (DiagDirection)(_m[tile].m5 & 3);
+			return (DiagDirection)GB(_m[tile].m5, 0, 2);
 		case TRANSPORT_WATER:
 			/* Water is stubborn, it stores the directions in a different order. */
-			switch (_m[tile].m5 & 3) {
+			switch (GB(_m[tile].m5, 0, 2)) {
 				case 0: return DIAGDIR_NE;
 				case 1: return DIAGDIR_SW;
 				case 2: return DIAGDIR_NW;