summaryrefslogtreecommitdiff
path: root/unmovable_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-28 06:17:41 +0000
committertron <tron@openttd.org>2006-06-28 06:17:41 +0000
commitc01951418dc9ec1b8f58cf2ed606ae5fd5c728d8 (patch)
tree853b7fa5cde55358c7a71489224e25af444f5229 /unmovable_cmd.c
parent7f8695c4fdc04e66d24ae54dcad22b3575e5fe33 (diff)
downloadopenttd-c01951418dc9ec1b8f58cf2ed606ae5fd5c728d8.tar.xz
(svn r5398) Rename checkRadioTowerNearby() to IsRadioTowerNearby() and flip its return value to make it a bit less ambiguous
Diffstat (limited to 'unmovable_cmd.c')
-rw-r--r--unmovable_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unmovable_cmd.c b/unmovable_cmd.c
index 0493750d5..306a9b447 100644
--- a/unmovable_cmd.c
+++ b/unmovable_cmd.c
@@ -297,14 +297,14 @@ static void ClickTile_Unmovable(TileIndex tile)
/* checks, if a radio tower is within a 9x9 tile square around tile */
-static bool checkRadioTowerNearby(TileIndex tile)
+static bool IsRadioTowerNearby(TileIndex tile)
{
TileIndex tile_s = tile - TileDiffXY(4, 4);
BEGIN_TILE_LOOP(tile, 9, 9, tile_s)
- if (IsTransmitterTile(tile)) return false;
+ if (IsTransmitterTile(tile)) return true;
END_TILE_LOOP(tile, 9, 9, tile_s)
- return true;
+ return false;
}
void GenerateUnmovables(void)
@@ -323,7 +323,7 @@ void GenerateUnmovables(void)
do {
tile = RandomTile();
if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == SLOPE_FLAT && h >= TILE_HEIGHT * 4) {
- if (!checkRadioTowerNearby(tile)) continue;
+ if (IsRadioTowerNearby(tile)) continue;
MakeTransmitter(tile);
if (--j == 0) break;
}