Changeset - r1928:b6493126f846
[Not reviewed]
master
0 2 0
tron - 19 years ago 2005-06-08 09:03:29
tron@openttd.org
(svn r2434) Fix some defects in r2433
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rail_cmd.c
Show inline comments
 
@@ -371,13 +371,13 @@ int32 CmdBuildSingleRail(int x, int y, u
 
					_map3_hi[tile] = p1;
 
					_map5[tile] = 0x10 | (rail_bit == 1 ? 0x08 : 0x00); // level crossing
 
				}
 
				break;
 
			}
 

	
 
			if (IsLevelCrossing(tile) == 0x10 && (m5 & 0x08 ? 1 : 2) == rail_bit)
 
			if (IsLevelCrossing(tile) && (m5 & 0x08 ? 1 : 2) == rail_bit)
 
				return_cmd_error(STR_1007_ALREADY_BUILT);
 
			/* FALLTHROUGH */
 

	
 
		default:
 
			ret = CheckRailSlope(tileh, rail_bit, 0, tile);
 
			if (CmdFailed(ret)) return ret;
town_cmd.c
Show inline comments
 
@@ -1838,13 +1838,13 @@ Town *ClosestTownFromTile(uint tile, uin
 
	uint dist, best = threshold;
 
	Town *best_town = NULL;
 

	
 
	// XXX - Fix this so for a given tiletype the owner of the type is in the same variable
 
	if (IsTileType(tile, MP_HOUSE) || (
 
				IsTileType(tile, MP_STREET) &&
 
				(IsLevelCrossing(tile) ? _map3_lo[tile] == OWNER_TOWN : GetTileOwner(tile))
 
				(IsLevelCrossing(tile) ? _map3_lo[tile] : GetTileOwner(tile)) == OWNER_TOWN
 
			))
 
		return GetTown(_map2[tile]);
 

	
 
	FOR_ALL_TOWNS(t) {
 
		if (t->xy != 0) {
 
			dist = DistanceManhattan(tile, t->xy);
0 comments (0 inline, 0 general)