Leave the loop as soon as one material is colorizable

This commit is contained in:
Benau 2016-12-04 11:15:32 +08:00
parent 2d980264b4
commit 902f4e20a5

View File

@ -203,6 +203,7 @@ void TrackObject::init(const XMLNode &xml_node, scene::ISceneNode* parent,
Material* m = material_manager->getMaterialFor(mb Material* m = material_manager->getMaterialFor(mb
->getMaterial().getTexture(0), mb); ->getMaterial().getTexture(0), mb);
colorizable = colorizable || m->isColorizable(); colorizable = colorizable || m->isColorizable();
if (colorizable) break;
} }
} }
} }