fix variant indexing

This commit is contained in:
MihailRis 2025-07-17 00:10:45 +03:00
parent d321085192
commit 6dfabe9ff3
3 changed files with 21 additions and 9 deletions

View file

@ -130,7 +130,7 @@ class BlocksRenderer {
return false;
}
const auto& block = *blockDefsCache[vox.id];
const auto& blockVariant = block.getVariant(vox.state.userbits);
const auto& blockVariant = block.getVariantByBits(vox.state.userbits);
uint8_t otherDrawGroup = blockVariant.drawGroup;
if ((otherDrawGroup && (otherDrawGroup != variant.drawGroup)) || !blockVariant.rt.solid) {
return true;