From 76b1d8831d1a5c2bc4a380d6821dfef9ca9f8745 Mon Sep 17 00:00:00 2001 From: ALIEN Date: Mon, 24 Apr 2017 17:53:34 +0200 Subject: [PATCH] Swapped order --- MAGE/MAGE/src/model/model.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAGE/MAGE/src/model/model.cpp b/MAGE/MAGE/src/model/model.cpp index 72e3edd6d..c4d93533a 100644 --- a/MAGE/MAGE/src/model/model.cpp +++ b/MAGE/MAGE/src/model/model.cpp @@ -59,14 +59,14 @@ namespace mage { return; } - if (model_part.material != MAGE_MDL_PART_DEFAULT_MATERIAL) { - Material material(*desc.GetMaterial(model_part.material)); + if (model_part.material == MAGE_MDL_PART_DEFAULT_MATERIAL) { + Material material(MAGE_MDL_PART_DEFAULT_MATERIAL); ShadedMaterial shaded_material(shader, material); SharedPtr< Model > submodel(new Model(model_part, m_mesh, shaded_material)); mapping[model_part.child] = SubModelPair(submodel, model_part.parent); } else { - Material material(MAGE_MDL_PART_DEFAULT_MATERIAL); + Material material(*desc.GetMaterial(model_part.material)); ShadedMaterial shaded_material(shader, material); SharedPtr< Model > submodel(new Model(model_part, m_mesh, shaded_material)); mapping[model_part.child] = SubModelPair(submodel, model_part.parent);