Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
571:edc9efe969c2 | 572:da381ecca97d |
---|---|
309 // By the layer change listener. | 309 // By the layer change listener. |
310 if(entry.force_update) | 310 if(entry.force_update) |
311 updateEntry(entry); | 311 updateEntry(entry); |
312 | 312 |
313 RenderItem& item = m_instances[entry.instance_index]; | 313 RenderItem& item = m_instances[entry.instance_index]; |
314 if(!item.image) | 314 InstanceVisual* visual = item.instance->getVisual<InstanceVisual>(); |
315 bool visible = visual->isVisible(); | |
316 if(!item.image || !visible) | |
315 continue; | 317 continue; |
316 | 318 |
317 Point3D screen_point = m_camera->virtualScreenToScreen(item.screenpoint); | 319 Point3D screen_point = m_camera->virtualScreenToScreen(item.screenpoint); |
318 // NOTE: | 320 // NOTE: |
319 // One would expect this to be necessary here, | 321 // One would expect this to be necessary here, |