- Proper heap handling of HWSprite pointer

- Added `Construct()` method and ensure it's called when created from any means
This commit is contained in:
Major Cooke 2023-10-08 13:08:18 -05:00 committed by Rachael Alexanderson
commit 48e7c2d994
3 changed files with 14 additions and 10 deletions

View file

@ -608,10 +608,8 @@ void HWDrawInfo::RenderParticles(subsector_t *sub, sector_t *front)
if (clipres == PClip_InFront) continue;
}
if (!sp->spr)
{
HWSprite sprite;
sp->spr = &sprite;
}
sp->spr = new HWSprite();
sp->spr->ProcessParticle(this, &sp->PT, front);
}
for (int i = Level->ParticlesInSubsec[sub->Index()]; i != NO_PARTICLE; i = Level->Particles[i].snext)