mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix uncaught exception: invalid vector subscript in BlockWrapsRenderer on invalid block state
This commit is contained in:
parent
0bbd215ab7
commit
1e851b05b4
1 changed files with 4 additions and 1 deletions
|
|
@ -56,7 +56,10 @@ void BlockWrapsRenderer::draw(const BlockWrapper& wrapper) {
|
|||
);
|
||||
break;
|
||||
case BlockModel::aabb: {
|
||||
const auto& aabb = def.rt.hitboxes[vox->state.rotation].at(0);
|
||||
const auto& aabb =
|
||||
(def.rotatable ? def.rt.hitboxes[vox->state.rotation]
|
||||
: def.hitboxes)
|
||||
.at(0);
|
||||
const auto& size = aabb.size();
|
||||
regions[0].scale(size.z, size.y);
|
||||
regions[1].scale(size.z, size.y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue