fix integer raycast filters & add simple raycast test

This commit is contained in:
MihailRis 2026-07-17 00:23:16 +03:00
parent f6e1f23c84
commit 39a4236553
4 changed files with 85 additions and 9 deletions

View file

@ -269,7 +269,7 @@ static inline voxel* raycast_blocks(
const auto& def = blocks.require(voxel->id);
if (voxel->id != BLOCK_AIR &&
(def.selectable || includeNonSelectable) &&
(filter == nullptr || (filter->find(def.rt.id) == filter->end()) ==
((filter == nullptr || filter->find(def.rt.id) == filter->end()) ==
settings.blocksFilterExcludeMode)) {
end = start + t * dir;
iend = {ix, iy, iz};