Fixed leak of reflected objects

This commit is contained in:
2025-11-11 23:45:03 -08:00
parent 51b8bcbc78
commit 614ce0a151
2 changed files with 8 additions and 7 deletions

View File

@@ -114,8 +114,6 @@ AABB KRSprite::getBounds()
void KRSprite::render(RenderInfo& ri)
{
ri.reflectedObjects.push_back(this);
if (m_lod_visible >= LOD_VISIBILITY_PRESTREAM && ri.renderPass->getType() == RenderPassType::RENDER_PASS_PRESTREAM) {
// Pre-stream sprites, even if the alpha is zero
m_spriteTexture.load(&getContext());
@@ -127,6 +125,8 @@ void KRSprite::render(RenderInfo& ri)
if (m_lod_visible <= LOD_VISIBILITY_PRESTREAM) return;
ri.reflectedObjects.push_back(this);
KRNode::render(ri);