Mercurial > fife-parpg
diff engine/core/view/layercache.cpp @ 572:da381ecca97d
* This is a better solution as in commit 3374. Now only visible instances be added to the RenderList. fixes[ticket:471]
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 30 Jun 2010 04:57:35 +0000 |
parents | f45e3e2995e0 |
children | 716fbe02140a |
line wrap: on
line diff
--- a/engine/core/view/layercache.cpp Tue Jun 29 02:26:28 2010 +0000 +++ b/engine/core/view/layercache.cpp Wed Jun 30 04:57:35 2010 +0000 @@ -311,7 +311,9 @@ updateEntry(entry); RenderItem& item = m_instances[entry.instance_index]; - if(!item.image) + InstanceVisual* visual = item.instance->getVisual<InstanceVisual>(); + bool visible = visual->isVisible(); + if(!item.image || !visible) continue; Point3D screen_point = m_camera->virtualScreenToScreen(item.screenpoint);