Skip to content

Commit

Permalink
Swapped order
Browse files Browse the repository at this point in the history
  • Loading branch information
matt77hias committed Apr 24, 2017
1 parent 9c4e26d commit 76b1d88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MAGE/MAGE/src/model/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 76b1d88

Please sign in to comment.