MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / CleanUp

Method CleanUp

engine/Poseidon/Graphics/Rendering/Shape/Shadow.cpp:224–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224void ShadowCache::CleanUp()
225{
226 // old entries are listed at the end
227 for (RemmemberShadow* entry = _data.Last(); entry;)
228 {
229 RemmemberShadow* next = _data.Prev(entry);
230 if (!entry->GetObject())
231 {
232 _data.Delete(entry);
233 }
234 else if (entry->_lastUsed < Glob.time - 60)
235 {
236 entry->GetObject()->RemoveShadow(entry->_level);
237 _data.Delete(entry);
238 }
239 else
240 {
241 break;
242 }
243 entry = next;
244 }
245}
246
247const float ShadowMemSize = 10 * 1024;
248

Callers

nothing calls this directly

Calls 5

LastMethod · 0.80
RemoveShadowMethod · 0.80
PrevMethod · 0.45
GetObjectMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected