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
404}404}
405 405
406int ModelMeshPartPayload::getLayer() const {406int 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 ModelPointer model = _model.lock();407 ModelPointer model = _model.lock();
411 if (model && model->isLayeredInFront()) {408 if (model) {
412 return LAYER_3D_FRONT;409 if (model->isLayeredInFront()) {
413 } else {410 return Item::LAYER_3D_FRONT;
414 return LAYER_3D;411 } else if (model->isLayeredInHUD()) {
412 return Item::LAYER_3D_HUD;
413 }
415 }414 }
415 return Item::LAYER_3D;
416}416}
417 417
418ShapeKey ModelMeshPartPayload::getShapeKey() const {418ShapeKey ModelMeshPartPayload::getShapeKey() const {