src/road_cmd.cpp
changeset 8413 c7f3384330a3
parent 8398 1e181e2e4e15
child 8428 fb88a9033b48
--- a/src/road_cmd.cpp	Fri Jan 25 13:54:27 2008 +0000
+++ b/src/road_cmd.cpp	Fri Jan 25 15:47:58 2008 +0000
@@ -376,7 +376,7 @@
 	*pieces |= MirrorRoadBits(*pieces);
 
 	/* partly leveled up tile, only if there's no road on that tile */
-	if ((existing == ROAD_NONE || existing == *pieces) && (tileh == SLOPE_W || tileh == SLOPE_S || tileh == SLOPE_E || tileh == SLOPE_N)) {
+	if ((existing == ROAD_NONE || existing == *pieces) && IsSlopeWithOneCornerRaised(tileh)) {
 		if (*pieces == ROAD_X || *pieces == ROAD_Y) return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform);
 	}
 	return CMD_ERROR;