rail_cmd.c
changeset 3483 d1f285509451
parent 3435 dfba5b1c7c2d
child 3486 9596268c8674
--- a/rail_cmd.c	Sun Apr 09 08:25:43 2006 +0000
+++ b/rail_cmd.c	Sun Apr 09 09:29:50 2006 +0000
@@ -2011,7 +2011,6 @@
 	-1,  0,  1,  0, /* x */
 	 0,  1,  0, -1  /* y */
 };
-static const byte _depot_track_mask[4] = {1, 2, 1, 2};
 
 static uint32 VehicleEnter_Track(Vehicle *v, TileIndex tile, int x, int y)
 {
@@ -2058,8 +2057,7 @@
 			/* leave the depot? */
 			if ((v = v->next) != NULL) {
 				v->vehstatus &= ~VS_HIDDEN;
-				v->u.rail.track = _depot_track_mask[dir];
-				assert(v->u.rail.track);
+				v->u.rail.track = (DiagDirToAxis(dir) == AXIS_X ? 1 : 2);
 			}
 		}
 	}