# HG changeset patch # User tron # Date 2005-06-08 09:03:29 # Node ID b6493126f846bfaf1ed71307ea3d890d3bc4cb5e # Parent cc0ee71e209dbdfb5a9caa49eaec99cc21a71bac (svn r2434) Fix some defects in r2433 diff --git a/rail_cmd.c b/rail_cmd.c --- a/rail_cmd.c +++ b/rail_cmd.c @@ -374,7 +374,7 @@ int32 CmdBuildSingleRail(int x, int y, u 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 */ diff --git a/town_cmd.c b/town_cmd.c --- a/town_cmd.c +++ b/town_cmd.c @@ -1841,7 +1841,7 @@ Town *ClosestTownFromTile(uint tile, uin // 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]);