equal
deleted
inserted
replaced
108 if (!IsTileType(tile, MP_STREET) && !IsTileType(tile, MP_TUNNELBRIDGE)) return CMD_ERROR; |
108 if (!IsTileType(tile, MP_STREET) && !IsTileType(tile, MP_TUNNELBRIDGE)) return CMD_ERROR; |
109 |
109 |
110 owner = IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile); |
110 owner = IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile); |
111 |
111 |
112 if (owner == OWNER_TOWN && _game_mode != GM_EDITOR) { |
112 if (owner == OWNER_TOWN && _game_mode != GM_EDITOR) { |
113 if (IsTileType(tile, MP_TUNNELBRIDGE)) { // index of town is not saved for bridge (no space) |
113 /* Are we removing a piece of road below a bridge, or not. If below |
|
114 * a bridge we need to calculate the town's index as it is not saved |
|
115 * in the map array (no space) */ |
|
116 if (IsTileType(tile, MP_TUNNELBRIDGE)) { |
114 t = ClosestTownFromTile(tile, _patches.dist_local_authority); |
117 t = ClosestTownFromTile(tile, _patches.dist_local_authority); |
115 } else { |
118 } else { |
116 t = GetTownByTile(tile); |
119 t = GetTownByTile(tile); |
117 } |
120 } |
118 } else { |
121 } else { |