# HG changeset patch # User spq@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1216046472 0 # Node ID 47979f9dce558b9d2dbed8be190b35dd08e24434 # Parent 73a9f7addd336eb4a519b396fd7abd65b518903a add possibility to hide instances/instance visuals; initialize instance visuals properly diff -r 73a9f7addd33 -r 47979f9dce55 engine/core/view/camera.cpp --- 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(); + if(!visual->isVisible()) + continue; InstanceVisualCacheItem& vc = visual->getCacheItem(this); // use cached values if there is no need to do full recalculation diff -r 73a9f7addd33 -r 47979f9dce55 engine/core/view/visual.cpp --- a/engine/core/view/visual.cpp Sun Jul 13 23:15:32 2008 +0000 +++ b/engine/core/view/visual.cpp Mon Jul 14 14:41:12 2008 +0000 @@ -41,7 +41,7 @@ static Logger _log(LM_VIEW); - Visual2DGfx::Visual2DGfx(): m_transparency(0) { + Visual2DGfx::Visual2DGfx(): m_transparency(0), m_visible(true) { } Visual2DGfx::~Visual2DGfx() {