mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Prune queued-card rows whose pooled item paints another entry
A pooled paint item reused by another card keeps a fresh frame stamp, so rows for cards that stopped painting survived every prune and the index grew for the whole session. The prune now also drops a row whose item paints a different entry id or source, and a test pins the bound.
This commit is contained in:
1 parent
da00b096d2
commit
1015b16664
2 files changed
+56
-1
No files matched your search
@@ -2298,7 +2298,15 @@ function addPaintItem(record, placement, temporalAlpha, selected) {
|
||||
function pruneQueuedItemIndex() {
|
||||
for (const [sourceId, bySource] of _queuedItemBySource) {
|
||||
for (const [entryId, item] of bySource) {
|
||||
if (item.stamp !== _frameStamp) bySource.delete(entryId);
|
||||
// A pooled item that now paints another entry keeps a fresh stamp.
|
||||
const entry = item.record.entry;
|
||||
if (
|
||||
item.stamp !== _frameStamp ||
|
||||
entry.id !== entryId ||
|
||||
entry.source !== sourceId
|
||||
) {
|
||||
bySource.delete(entryId);
|
||||
}
|
||||
}
|
||||
if (bySource.size === 0) _queuedItemBySource.delete(sourceId);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user