elrail.c
changeset 3375 7fea43d72298
parent 3368 57034dcd7978
child 3376 a946f51034e7
equal deleted inserted replaced
3374:9721c51bea25 3375:7fea43d72298
   101 		case MP_STREET:
   101 		case MP_STREET:
   102 			if (GetRailTypeCrossing(t) != RAILTYPE_ELECTRIC) return 0;
   102 			if (GetRailTypeCrossing(t) != RAILTYPE_ELECTRIC) return 0;
   103 			return GetCrossingRailBits(t);
   103 			return GetCrossingRailBits(t);
   104 		case MP_STATION:
   104 		case MP_STATION:
   105 			if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
   105 			if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
   106 			return GetRailStationTrack(t);
   106 			return TrackToTrackBits(GetRailStationTrack(t));
   107 		default:
   107 		default:
   108 			return 0;
   108 			return 0;
   109 	}
   109 	}
   110 }
   110 }
   111 
   111 
   156 			}
   156 			}
   157 		}
   157 		}
   158 	}
   158 	}
   159 
   159 
   160 	for (i = DIAGDIR_NE; i < DIAGDIR_END; i++) {
   160 	for (i = DIAGDIR_NE; i < DIAGDIR_END; i++) {
   161 		extern const TileIndexDiffC _tileoffs_by_dir[];
       
   162 		TileIndex neighbour = ti->tile + TileOffsByDir(i);
   161 		TileIndex neighbour = ti->tile + TileOffsByDir(i);
   163 		uint foundation = 0;
   162 		uint foundation = 0;
   164 		int k;
   163 		int k;
   165 
   164 
   166 		/* Here's one of the main headaches. GetTileSlope does not correct for possibly
   165 		/* Here's one of the main headaches. GetTileSlope does not correct for possibly