From 902f4e20a557f73b3fd0c9c1ecd9724ad41c0fa1 Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 4 Dec 2016 11:15:32 +0800 Subject: [PATCH] Leave the loop as soon as one material is colorizable --- src/tracks/track_object.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tracks/track_object.cpp b/src/tracks/track_object.cpp index 08970655f..ebf01ff84 100644 --- a/src/tracks/track_object.cpp +++ b/src/tracks/track_object.cpp @@ -203,6 +203,7 @@ void TrackObject::init(const XMLNode &xml_node, scene::ISceneNode* parent, Material* m = material_manager->getMaterialFor(mb ->getMaterial().getTexture(0), mb); colorizable = colorizable || m->isColorizable(); + if (colorizable) break; } } }