fix: Doors must not cast shadows

This commit is contained in:
Vsevolod Kremianskii 2021-02-17 23:18:14 +07:00
parent 78762b79c4
commit 27d66ad5bf

View file

@ -88,7 +88,10 @@ bool ModelNodeSceneNode::shouldRender() const {
}
bool ModelNodeSceneNode::shouldCastShadows() const {
if (_modelSceneNode->classification() == ModelSceneNode::Classification::Door) return false;
shared_ptr<ModelMesh> mesh(_modelNode->mesh());
return mesh && mesh->shouldCastShadows() && !static_cast<bool>(_modelNode->skin());
}