(svn r831) Remove station-specific roadbits magic. Tron already fixed road stations so that they don't give out roadbits in r780.
authorpasky
Fri, 26 Nov 2004 22:29:02 +0000
changeset 516 11e274df7001
parent 515 d8a4fe182483
child 517 8729a9a72d78
(svn r831) Remove station-specific roadbits magic. Tron already fixed road stations so that they don't give out roadbits in r780.
town_cmd.c
--- a/town_cmd.c	Fri Nov 26 22:21:12 2004 +0000
+++ b/town_cmd.c	Fri Nov 26 22:29:02 2004 +0000
@@ -385,20 +385,9 @@
 
 }
 
-static inline byte GetTownRoadBitsByTile(TileIndex tile) {
-	byte b = GetRoadBitsByTile(tile);
-
-	/* Don't get fooled and check if we didn't hit a station.
-	 * That little roadstation pinkeye returns nonzero
-	 * GetRoadBitsByTile(), but the road doesn't really go through
-	 * it (nor can we extend it at that place, but it is reasonable
-	 * to build a road along the station). */
-	return IS_TILETYPE(tile, MP_STATION) ? 0 : b;
-}
-
 static byte GetTownRoadMask(TileIndex tile)
 {
-	byte b = GetTownRoadBitsByTile(tile);
+	byte b = GetRoadBitsByTile(tile);
 	byte r=0;
 	if (b&1) r|=10;
 	if (b&2) r|=5;
@@ -420,7 +409,7 @@
 
 	for(;;) {
 		// Check if there already is a road at this point?
-		if (GetTownRoadBitsByTile(tile) == 0) {
+		if (GetRoadBitsByTile(tile) == 0) {
 			// No, try to build one in the direction.
 			// if that fails clear the land, and if that fails exit.
 			// This is to make sure that we can build a road here later.
@@ -745,7 +734,7 @@
 	tile = t->xy;
 	ptr = _town_coord_mod;
 	do {
-		if (GetTownRoadBitsByTile(tile) != 0) {
+		if (GetRoadBitsByTile(tile) != 0) {
 			int r = GrowTownAtRoad(t, tile);
 			_current_player = old_player;
 			return r;