Skip to content

Commit

Permalink
Fix pushing voxel with another substance
Browse files Browse the repository at this point in the history
  • Loading branch information
vanjac committed Jun 27, 2024
1 parent c3d0297 commit 8317b2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Assets/VoxelEditor/VoxelArrayEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -992,14 +992,15 @@ private void SingleAdjust(Vector3Int adjustDirection, HashSet<Vector3Int> voxels
// remove selection
selectedThings.Remove(faceSel);
voxelsToUpdate.Add(oldPos);
return false;
}
else
{
selectedThings.Add(opposingFaceSel);
AdjustSelectedFace(opposingFaceSel, adjustDirection, null, voxelsToUpdate); // recurse!
// need to move the other substance out of the way first
AdjustSelectedFace(opposingFaceSel, adjustDirection, null, voxelsToUpdate); // recurse!
// now it's safe to move this face
}
return false;
}

VoxelFace movingFace = oldVoxel.faces[faceI];
Expand Down

0 comments on commit 8317b2c

Please sign in to comment.