Changeset - r6720:223b9625fd16
[Not reviewed]
master
0 2 0
glx - 17 years ago 2007-05-27 01:59:07
glx@openttd.org
(svn r9952) -Fix r9951: it was not possible to build a drive-through station over a road/tram
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -615,7 +615,7 @@ static int32 ClearTile_Station(TileIndex
 

	
 
// Tries to clear the given area. Returns the cost in case of success.
 
// Or an error code if it failed.
 
int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, StationID* station)
 
int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, StationID* station, bool check_clear = true)
 
{
 
	int32 cost = 0;
 
	int allowed_z = -1;
 
@@ -678,7 +678,7 @@ int32 CheckFlatLandBelow(TileIndex tile,
 
					return_cmd_error(STR_3006_ADJOINS_MORE_THAN_ONE_EXISTING);
 
				}
 
			}
 
		} else {
 
		} else if (check_clear) {
 
			int32 ret = DoCommand(tile_cur, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
 
			if (CmdFailed(ret)) return ret;
 
			cost += ret;
 
@@ -1280,7 +1280,7 @@ int32 CmdBuildRoadStop(TileIndex tile, u
 
		/* Do not remove roadtypes! */
 
		rts |= cur_rts;
 
	}
 
	cost = CheckFlatLandBelow(tile, 1, 1, flags, is_drive_through ? 5 << p1 : 1 << p1, NULL);
 
	cost = CheckFlatLandBelow(tile, 1, 1, flags, is_drive_through ? 5 << p1 : 1 << p1, NULL, !build_over_road);
 
	if (CmdFailed(cost)) return cost;
 

	
 
	Station *st = NULL;
src/unmovable_cmd.cpp
Show inline comments
 
@@ -73,7 +73,7 @@ void UpdateCompanyHQ(Player *p, uint sco
 
	MarkTileDirtyByTile(tile + TileDiffXY(1, 1));
 
}
 

	
 
extern int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, StationID* station);
 
extern int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, StationID* station, bool check_clear = true);
 

	
 
/** Build or relocate the HQ. This depends if the HQ is already built or not
 
 * @param tile tile where the HQ will be built or relocated to
0 comments (0 inline, 0 general)