Showing the changes to libraries/render-utils/src/MeshPartPayload.cpp (1 of 13 files). Show all
Unified · Split
| @@ -404,15 +404,15 @@ ItemKey ModelMeshPartPayload::getKey() const { · 403 unmodified lines | ||
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | int ModelMeshPartPayload::getLayer() const { |
| 407 | − // MAgic number while we are defining the layering mechanism: | |
| 408 | − const int LAYER_3D_FRONT = 1; | |
| 409 | − const int LAYER_3D = 0; | |
| 410 | 407 | ModelPointer model = _model.lock(); |
| 411 | − if (model && model->isLayeredInFront()) { | |
| 412 | − return LAYER_3D_FRONT; | |
| 413 | − } else { | |
| 414 | − return LAYER_3D; | |
| 408 | + if (model) { | |
| 409 | + if (model->isLayeredInFront()) { | |
| 410 | + return Item::LAYER_3D_FRONT; | |
| 411 | + } else if (model->isLayeredInHUD()) { | |
| 412 | + return Item::LAYER_3D_HUD; | |
| 413 | + } | |
| 415 | 414 | } |
| 415 | + return Item::LAYER_3D; | |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | 418 | ShapeKey ModelMeshPartPayload::getShapeKey() const { |