diff engine/core/view/camera.cpp @ 57:47979f9dce55

add possibility to hide instances/instance visuals; initialize instance visuals properly
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 14 Jul 2008 14:41:12 +0000
parents 90005975cdbb
children 29309cd5e240
line wrap: on
line diff
--- a/engine/core/view/camera.cpp	Sun Jul 13 23:15:32 2008 +0000
+++ b/engine/core/view/camera.cpp	Mon Jul 14 14:41:12 2008 +0000
@@ -503,6 +503,8 @@
 			for (;instance_it != allinstances.end(); ++instance_it) {
 				Instance* instance = *instance_it;
 				InstanceVisual* visual = instance->getVisual<InstanceVisual>();
+				if(!visual->isVisible())
+					continue;
 				InstanceVisualCacheItem& vc = visual->getCacheItem(this);
 				
 				// use cached values if there is no need to do full recalculation