History

wip hud layering and fix crashes

SamGondelman committed 9 years ago

Commit 477dfdf1 parent fa838e413 files · +112 −48Browse files

Showing the changes to libraries/render-utils/src/MeshPartPayload.cpp (1 of 13 files). Show all

Unified · Split

libraries/render-utils/src/MeshPartPayload.cpp+7−7
@@ -404,15 +404,15 @@ ItemKey ModelMeshPartPayload::getKey() const { · 403 unmodified lines
404404 }
405405
406406 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;
410407 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+ }
415414 }
415+ return Item::LAYER_3D;
416416 }
417417
418418 ShapeKey ModelMeshPartPayload::getShapeKey() const {