This commit is contained in:
aozhiwei 2021-09-10 09:46:13 +00:00
parent 721515fc5c
commit e2e2fefc23
2 changed files with 8 additions and 1 deletions

View File

@ -10,6 +10,11 @@ enum ExplosionType_e
kExplosionEnemyAndObstacle = 2
};
Explosion::~Explosion()
{
int i = 0;
}
void Explosion::IndifferenceAttack(Room* room,
const a8::Vec2& center,
float explosion_range,
@ -134,7 +139,8 @@ void Explosion::InternalAttack()
if (explosion_damage_delay_ <= 0) {
ProcDamage();
} else {
std::shared_ptr<Explosion>* self = new std::shared_ptr<Explosion>(this);
std::shared_ptr<Explosion>* self = new std::shared_ptr<Explosion>();
*self = shared_from_this();
room_->xtimer.AddDeadLineTimerAndAttach
(explosion_damage_delay_ / FRAME_RATE_MS,
a8::XParams()

View File

@ -7,6 +7,7 @@ class EntityFactory;
class Explosion : public std::enable_shared_from_this<Explosion>
{
public:
~Explosion();
int exclude_uniid = 0;
Room* GetRoom() { return room_; };