File diff r7535:b69be69d3c06 → r7536:851d38e350c3
src/road_cmd.cpp
Show inline comments
 
@@ -195,16 +195,18 @@ CommandCost CmdRemoveRoad(TileIndex tile
 
				ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM);
 

	
 
				present ^= c;
 
				if (present == ROAD_NONE) {
 
					RoadTypes rts = GetRoadTypes(tile) & ComplementRoadTypes(RoadTypeToRoadTypes(rt));
 
					if (rts == ROADTYPES_NONE) {
 
						/* Includes MarkTileDirtyByTile() */
 
						DoClearSquare(tile);
 
					} else {
 
						SetRoadBits(tile, ROAD_NONE, rt);
 
						SetRoadTypes(tile, rts);
 
						MarkTileDirtyByTile(tile);
 
					}
 
				} else {
 
					/* When bits are removed, you *always* end up with something that
 
					 * is not a complete straight road tile. However, trams do not have
 
					 * onewayness, so they cannot remove it either. */
 
					if (rt != ROADTYPE_TRAM) SetDisallowedRoadDirections(tile, DRD_NONE);