remove unecessary allocations
This commit is contained in:
parent
174344ddf1
commit
9466c2d138
3 changed files with 2 additions and 10 deletions
|
|
@ -1006,7 +1006,6 @@ void DVisualThinker::Construct()
|
|||
PT.subsector = nullptr;
|
||||
cursector = nullptr;
|
||||
PT.color = 0xffffff;
|
||||
spr = new HWSprite();
|
||||
AnimatedTexture.SetNull();
|
||||
}
|
||||
|
||||
|
|
@ -1018,11 +1017,6 @@ DVisualThinker::DVisualThinker()
|
|||
void DVisualThinker::OnDestroy()
|
||||
{
|
||||
PT.alpha = 0.0; // stops all rendering.
|
||||
if(spr)
|
||||
{
|
||||
delete spr;
|
||||
spr = nullptr;
|
||||
}
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ public:
|
|||
|
||||
// internal only variables
|
||||
particle_t PT;
|
||||
HWSprite *spr; //in an effort to cache the result.
|
||||
|
||||
DVisualThinker();
|
||||
void Construct();
|
||||
|
|
|
|||
|
|
@ -669,10 +669,9 @@ void HWDrawInfo::RenderParticles(subsector_t *sub, sector_t *front)
|
|||
int clipres = mClipPortal->ClipPoint(sp->PT.Pos.XY());
|
||||
if (clipres == PClip_InFront) continue;
|
||||
}
|
||||
|
||||
assert(sp->spr);
|
||||
|
||||
sp->spr->ProcessParticle(this, &sp->PT, front, sp);
|
||||
HWSprite sprite;
|
||||
sprite.ProcessParticle(this, &sp->PT, front, sp);
|
||||
}
|
||||
for (int i = Level->ParticlesInSubsec[sub->Index()]; i != NO_PARTICLE; i = Level->Particles[i].snext)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue