27 | if (IsValidTile(tile + m * 2 * delta_mid)) {
| 28 | for (int d = -1; d <= 1; d += 2) {
|
---|
28 | if (!IsTileFlat(tile + m * 2 * delta_mid)) {
| 29 | if (IsValidTile(t_dm + d * delta)) {
|
---|
| | 30 | if (!IsTileFlat(t_dm + d * delta) &&
|
---|
| | 31 | (GetInclinedSlopeDirection(GetTileSlope(t_dm + d * delta)) == dir_rot ||
|
---|
| | 32 | GetInclinedSlopeDirection(GetTileSlope(t_dm + d * delta)) == ReverseDiagDir(dir_rot)) &&
|
---|
| | 33 | FlowsLock(t_dm + d * delta)) {
|
---|
| | 34 | return false;
|
---|
| | 35 | }
|
---|
| | 36 |
|
---|
| | 37 | if (IsValidTile(t_dm + d * 2 * delta)) {
|
---|
| | 38 | if (!IsTileFlat(t_dm + d * 2 * delta) &&
|
---|
| | 39 | (GetInclinedSlopeDirection(GetTileSlope(t_dm + d * 2 * delta)) == dir_rot ||
|
---|
| | 40 | GetInclinedSlopeDirection(GetTileSlope(t_dm + d * 2 * delta)) == ReverseDiagDir(dir_rot)) &&
|
---|
| | 41 | FlowsLock(t_dm + d * 2 * delta)) {
|
---|
| | 42 | return false;
|
---|
| | 43 | }
|
---|
| | 44 | }
|
---|
| | 45 | }
|
---|
| | 46 | }
|
---|
| | 47 |
|
---|
| | 48 | TileIndex t_2dm = t_dm + m * delta_mid;
|
---|
| | 49 | if (IsValidTile(t_2dm)) {
|
---|
| | 50 | if (!IsTileFlat(t_2dm)) {
|
---|
42 | for (int d = -1; d <= 1; d += 2) {
| 42 | if (!IsTileFlat(t_2dm + d * delta) &&
|
---|
43 | if (IsValidTile(tile + m * delta_mid + d * delta)) {
| 43 | (GetInclinedSlopeDirection(GetTileSlope(t_2dm + d * delta)) == dir_rot ||
|
---|
44 | if (!IsTileFlat(tile + m * delta_mid + d * delta) &&
| 44 | GetInclinedSlopeDirection(GetTileSlope(t_2dm + d * delta)) == ReverseDiagDir(dir_rot)) &&
|
---|
45 | (GetInclinedSlopeDirection(GetTileSlope(tile + m * delta_mid + d * delta)) == dir_rot ||
| 45 | FlowsLock(t_2dm + d * delta)) {
|
---|
46 | GetInclinedSlopeDirection(GetTileSlope(tile + m * delta_mid + d * delta)) == ReverseDiagDir(dir_rot)) &&
| 46 | return false;
|
---|
47 | FlowsLock(tile + m * delta_mid + d * delta)) {
| 47 | }
|
---|
48 | return false;
| | |
---|
49 | }
| | |
---|
50 |
| | |
---|
51 | if (IsValidTile(tile + m * delta_mid + d * 2 * delta)) {
| | |
---|
52 | if (!IsTileFlat(tile + m * delta_mid + d * 2 * delta) &&
| | |
---|
53 | (GetInclinedSlopeDirection(GetTileSlope(tile + m * delta_mid + d * 2 * delta)) == dir_rot ||
| | |
---|
54 | GetInclinedSlopeDirection(GetTileSlope(tile + m * delta_mid + d * 2 * delta)) == ReverseDiagDir(dir_rot)) &&
| | |
---|
55 | FlowsLock(tile + m * delta_mid + d * 2 * delta)) {
| | |
---|
56 | return false;
| | |
---|
63 | }
| | |
---|
64 |
| | |
---|
65 | if (!IsTileFlat(tile + m * 2 * delta_mid + d * delta) &&
| | |
---|
66 | (GetInclinedSlopeDirection(GetTileSlope(tile + m * 2 * delta_mid + d * delta)) == dir_rot ||
| | |
---|
67 | GetInclinedSlopeDirection(GetTileSlope(tile + m * 2 * delta_mid + d * delta)) == ReverseDiagDir(dir_rot)) &&
| | |
---|
68 | FlowsLock(tile + m * 2 * delta_mid + d * delta)) {
| | |
---|
69 | return false;
| | |
---|
70 | }
| | |
---|
71 |
| | |
---|
72 | if (IsValidTile(tile + m * 3 * delta_mid + d * delta)) {
| | |
---|
73 | if ((GetInclinedSlopeDirection(GetTileSlope(tile + m * 3 * delta_mid + d * delta)) == dir ||
| | |
---|
74 | GetInclinedSlopeDirection(GetTileSlope(tile + m * 3 * delta_mid + d * delta)) == ReverseDiagDir(dir)) &&
| | |
---|
75 | FlowsLock(tile + m * 3 * delta_mid + d * delta)) {
| | |
---|
76 | return false;
| | |
---|
77 | }
| | |
---|