Skip to content

Commit

Permalink
Fix small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
heyx3 committed Jan 7, 2025
1 parent e5092fc commit e2e3688
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions WFC++/Tiled3D/Grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void Grid::SetFace(Vector3i pos, Directions3D dir, const FaceCorners& points, Re
auto chosenFace = GetFace(cell.ChosenTile, cell.ChosenPermutation, faceDir);
if (chosenFace.Points != points)
{
ClearCell(facePos, report);
ClearCell(facePos, report, false);
needsFiltering = true;
}
else
Expand All @@ -165,7 +165,8 @@ void Grid::SetFace(Vector3i pos, Directions3D dir, const FaceCorners& points, Re
}

FaceConstraints[{ facePos, static_cast<int>(faceDir) }] = points;
ApplyFilter(facePos, faceDir, cell, report);
if (needsFiltering)
ApplyFilter(facePos, { faceDir, points }, cell, report);
}
}

Expand Down
2 changes: 1 addition & 1 deletion WFC++/Tiled3D/Transform3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ namespace WFC
FaceCorners Points;

FacePermutation() : FacePermutation(Directions3D::MinX) { }
FacePermutation(Directions3D side) : Side(side)
explicit FacePermutation(Directions3D side) : Side(side)
{
for (int i = 0; i < N_FACE_POINTS; ++i)
Points[i] = static_cast<PointID>(-1);
Expand Down

0 comments on commit e2e3688

Please sign in to comment.