1
0
Fork 0

(svn r5497) -Fix: somehow in r5315 slipped some wrong logic, allowed you to build rail on all road pieces without really building it ;)

release/0.5
truelight 2006-07-14 18:14:08 +00:00
parent 5606e6d7b6
commit 26e1e8ce61
1 changed files with 6 additions and 8 deletions

View File

@ -286,15 +286,13 @@ int32 CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!EnsureNoVehicle(tile)) return CMD_ERROR;
if (GetRoadTileType(tile) == ROAD_TILE_NORMAL) {
if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
if ((track == TRACK_X && GetRoadBits(tile) == ROAD_Y) ||
(track == TRACK_Y && GetRoadBits(tile) == ROAD_X)) {
if (flags & DC_EXEC) {
MakeRoadCrossing(tile, GetTileOwner(tile), _current_player, (track == TRACK_X ? AXIS_Y : AXIS_X), p1, GetTownIndex(tile));
}
if (GetRoadTileType(tile) == ROAD_TILE_NORMAL &&
((track == TRACK_X && GetRoadBits(tile) == ROAD_Y) ||
(track == TRACK_Y && GetRoadBits(tile) == ROAD_X))) {
if (flags & DC_EXEC) {
MakeRoadCrossing(tile, GetTileOwner(tile), _current_player, (track == TRACK_X ? AXIS_Y : AXIS_X), p1, GetTownIndex(tile));
}
break;
}