From 05578c759eae30f627eb72906bfdce597342f642 Mon Sep 17 00:00:00 2001 From: Pavel Stupnikov Date: Sun, 1 Mar 2015 04:19:50 +0300 Subject: [PATCH] hs fixed --HG-- branch : openttd --- src/town_cmd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 18ca24ce5b..82ee5fe14e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1300,7 +1300,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t * Returns "growth" if a house was built, or no if the build failed. * @param t town to inquiry * @param tile to inquiry - * @return something other than zero(0)if town expansion was possible + * @return something other than zero(0) if town expansion was possible */ static int GrowTownAtRoad(Town *t, TileIndex tile) { @@ -1339,7 +1339,7 @@ static int GrowTownAtRoad(Town *t, TileIndex tile) * and return if no more road blocks available */ if (IsValidDiagDirection(target_dir)) cur_rb &= ~DiagDirToRoadBits(ReverseDiagDir(target_dir)); if (cur_rb == ROAD_NONE) { - return _grow_town_result; + return (_grow_town_result == GROWTH_SUCCEED); } if (IsTileType(tile, MP_TUNNELBRIDGE)) { @@ -1355,7 +1355,7 @@ static int GrowTownAtRoad(Town *t, TileIndex tile) if (IsTileType(tile, MP_ROAD) && !IsRoadDepot(tile) && HasTileRoadType(tile, ROADTYPE_ROAD)) { /* Don't allow building over roads of other cities */ if (IsRoadOwner(tile, ROADTYPE_ROAD, OWNER_TOWN) && Town::GetByTile(tile) != t) { - _grow_town_result = GROWTH_SUCCEED; + _grow_town_result = GROWTH_SEARCH_STOPPED; } else if (IsRoadOwner(tile, ROADTYPE_ROAD, OWNER_NONE) && _game_mode == GM_EDITOR) { /* If we are in the SE, and this road-piece has no town owner yet, it just found an * owner :) (happy happy happy road now) */ @@ -1389,7 +1389,7 @@ static RoadBits GenRandomRoadBits() /** * Grow the town * @param t town to grow - * @return true iff a house was built + * @return true iff something was built (house, road or bridge) */ static bool GrowTown(Town *t) {