@@ -1499,12 +1499,16 @@ static VehicleEnterTileStatus VehicleEnt
if (abs(z) > 2) return VETSB_CANNOT_ENTER;
/* Direction into the wormhole */
const DiagDirection dir = GetTunnelBridgeDirection(tile);
/* Direction of the vehicle */
const DiagDirection vdir = DirToDiagDir(v->direction);
/* New position of the vehicle on the tile */
byte pos = (DiagDirToAxis(vdir) == AXIS_X ? x : y) & TILE_UNIT_MASK;
/* Number of units moved by the vehicle since entering the tile */
byte frame = (vdir == DIAGDIR_NE || vdir == DIAGDIR_NW) ? TILE_SIZE - 1 - pos : pos;
if (IsTunnel(tile)) {
byte fc = (x & 0xF) + (y << 4);
if (v->type == VEH_TRAIN) {
Train *t = Train::From(v);