fix: invalid block segment was not removed on hover

This commit is contained in:
MihailRis 2024-07-27 14:46:52 +03:00
parent 26dcac0134
commit f485ba5e54

View File

@ -391,7 +391,7 @@ voxel* PlayerController::updateSelection(float maxDistance) {
selection.position = chunks->seekOrigin(
iend, indices->blocks.get(selection.vox.id), selectedState
);
auto origin = chunks->get(iend);
auto origin = chunks->get(selection.position);
if (origin && origin->id != vox->id) {
chunks->set(iend.x, iend.y, iend.z, 0, {});
return updateSelection(maxDistance);