mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add explicit 'solid' block property
This commit is contained in:
parent
336ae09f66
commit
e451a4f3a3
5 changed files with 12 additions and 4 deletions
|
|
@ -34,11 +34,15 @@ std::unique_ptr<Content> ContentBuilder::build() {
|
|||
|
||||
if (def.variants) {
|
||||
for (auto& variant : def.variants->variants) {
|
||||
variant.rt.solid = variant.model.type == BlockModelType::BLOCK;
|
||||
variant.rt.solid =
|
||||
variant.model.type == BlockModelType::BLOCK ||
|
||||
def.explictlySolid;
|
||||
}
|
||||
def.defaults = def.variants->variants.at(0);
|
||||
} else {
|
||||
def.defaults.rt.solid = def.defaults.model.type == BlockModelType::BLOCK;
|
||||
def.defaults.rt.solid =
|
||||
def.defaults.model.type == BlockModelType::BLOCK ||
|
||||
def.explictlySolid;
|
||||
}
|
||||
|
||||
const float EPSILON = 0.01f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue