This commit is contained in:
aozhiwei 2024-01-18 16:53:58 +08:00
parent 442346967d
commit 647c8efd3c
11 changed files with 11 additions and 0 deletions

View File

@ -31,6 +31,7 @@ Android::Android():Human()
Android::~Android()
{
SetDestorying();
if (agent_) {
f8::BtMgr::Instance()->BtDestory(agent_);
agent_ = nullptr;

View File

@ -48,6 +48,7 @@ Bullet::Bullet():MoveableEntity()
Bullet::~Bullet()
{
SetDestorying();
--PerfMonitor::Instance()->entity_num[ET_Bullet];
if (IsFlyHook()) {
if (sender.Get()) {

View File

@ -39,6 +39,7 @@ Car::Car():Creature()
Car::~Car()
{
SetDestorying();
--PerfMonitor::Instance()->entity_num[ET_Car];
}

View File

@ -78,6 +78,7 @@ Creature::Creature():MoveableEntity()
Creature::~Creature()
{
SetDestorying();
for (auto itr = slave_heros_.begin(); itr != slave_heros_.end(); ++itr) {
while (!list_empty(&itr->second)) {
Hero* hero = list_first_entry(&itr->second,

View File

@ -15,6 +15,7 @@ Entity::Entity()
Entity::~Entity()
{
SetDestorying();
--Perf::Instance()->entity_num;
}

View File

@ -42,6 +42,7 @@ Hero::Hero():Creature()
Hero::~Hero()
{
SetDestorying();
DetachFromMaster();
if (agent_) {
f8::BtMgr::Instance()->BtDestory(agent_);

View File

@ -96,6 +96,7 @@ Human::Human():Creature()
Human::~Human()
{
SetDestorying();
int i = 0;
}

View File

@ -15,6 +15,7 @@ Loot::Loot():RoomEntity()
Loot::~Loot()
{
SetDestorying();
--PerfMonitor::Instance()->entity_num[ET_Loot];
}

View File

@ -30,6 +30,7 @@ Obstacle::Obstacle():Entity()
Obstacle::~Obstacle()
{
SetDestorying();
--PerfMonitor::Instance()->entity_num[ET_Obstacle];
}

View File

@ -53,6 +53,7 @@ Player::Player():Human()
Player::~Player()
{
SetDestorying();
--PerfMonitor::Instance()->entity_num[ET_Player];
PlayerMgr::Instance()->DecAccountNum(account_id);
}

View File

@ -34,6 +34,7 @@ RoomObstacle::RoomObstacle():Obstacle()
RoomObstacle::~RoomObstacle()
{
SetDestorying();
if (!detached_) {
if (master.Get()) {
master.Get()->SlaveOnRemove(this);