From 6a65a4cf5b6b10839254c0c5846ec2dbfea882f8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 23 Jul 2016 02:14:30 +0300 Subject: Allow delete untracker being particle effects. This fix some possible memory leaks. --- src/being/actorsprite.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/being/actorsprite.h') diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index 6f5c020c2..c06f1c983 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -81,9 +81,14 @@ class ActorSprite notfinal : public CompoundSprite, public Actor { return BlockType::NONE; } /** - * Take control of a particle. + * Take control of a particle. Particle can be auto deleted. */ - void controlParticle(Particle *const particle); + void controlAutoParticle(Particle *const particle); + + /** + * Take control of a particle. Owner must remove particle by self. + */ + void controlCustomParticle(Particle *const particle); /** * Returns the required size of a target cursor for this being. @@ -190,6 +195,8 @@ class ActorSprite notfinal : public CompoundSprite, public Actor mChildParticleEffects.size(); } + void controlParticleDeleted(Particle *const particle); + protected: /** * A status effect block is a 16 bit mask of status effects. We assign -- cgit v1.2.3-70-g09d2