1
This commit is contained in:
parent
442346967d
commit
647c8efd3c
@ -31,6 +31,7 @@ Android::Android():Human()
|
|||||||
|
|
||||||
Android::~Android()
|
Android::~Android()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
if (agent_) {
|
if (agent_) {
|
||||||
f8::BtMgr::Instance()->BtDestory(agent_);
|
f8::BtMgr::Instance()->BtDestory(agent_);
|
||||||
agent_ = nullptr;
|
agent_ = nullptr;
|
||||||
|
@ -48,6 +48,7 @@ Bullet::Bullet():MoveableEntity()
|
|||||||
|
|
||||||
Bullet::~Bullet()
|
Bullet::~Bullet()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
--PerfMonitor::Instance()->entity_num[ET_Bullet];
|
--PerfMonitor::Instance()->entity_num[ET_Bullet];
|
||||||
if (IsFlyHook()) {
|
if (IsFlyHook()) {
|
||||||
if (sender.Get()) {
|
if (sender.Get()) {
|
||||||
|
@ -39,6 +39,7 @@ Car::Car():Creature()
|
|||||||
|
|
||||||
Car::~Car()
|
Car::~Car()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
--PerfMonitor::Instance()->entity_num[ET_Car];
|
--PerfMonitor::Instance()->entity_num[ET_Car];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ Creature::Creature():MoveableEntity()
|
|||||||
|
|
||||||
Creature::~Creature()
|
Creature::~Creature()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
for (auto itr = slave_heros_.begin(); itr != slave_heros_.end(); ++itr) {
|
for (auto itr = slave_heros_.begin(); itr != slave_heros_.end(); ++itr) {
|
||||||
while (!list_empty(&itr->second)) {
|
while (!list_empty(&itr->second)) {
|
||||||
Hero* hero = list_first_entry(&itr->second,
|
Hero* hero = list_first_entry(&itr->second,
|
||||||
|
@ -15,6 +15,7 @@ Entity::Entity()
|
|||||||
|
|
||||||
Entity::~Entity()
|
Entity::~Entity()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
--Perf::Instance()->entity_num;
|
--Perf::Instance()->entity_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ Hero::Hero():Creature()
|
|||||||
|
|
||||||
Hero::~Hero()
|
Hero::~Hero()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
DetachFromMaster();
|
DetachFromMaster();
|
||||||
if (agent_) {
|
if (agent_) {
|
||||||
f8::BtMgr::Instance()->BtDestory(agent_);
|
f8::BtMgr::Instance()->BtDestory(agent_);
|
||||||
|
@ -96,6 +96,7 @@ Human::Human():Creature()
|
|||||||
|
|
||||||
Human::~Human()
|
Human::~Human()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ Loot::Loot():RoomEntity()
|
|||||||
|
|
||||||
Loot::~Loot()
|
Loot::~Loot()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
--PerfMonitor::Instance()->entity_num[ET_Loot];
|
--PerfMonitor::Instance()->entity_num[ET_Loot];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ Obstacle::Obstacle():Entity()
|
|||||||
|
|
||||||
Obstacle::~Obstacle()
|
Obstacle::~Obstacle()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
--PerfMonitor::Instance()->entity_num[ET_Obstacle];
|
--PerfMonitor::Instance()->entity_num[ET_Obstacle];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ Player::Player():Human()
|
|||||||
|
|
||||||
Player::~Player()
|
Player::~Player()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
--PerfMonitor::Instance()->entity_num[ET_Player];
|
--PerfMonitor::Instance()->entity_num[ET_Player];
|
||||||
PlayerMgr::Instance()->DecAccountNum(account_id);
|
PlayerMgr::Instance()->DecAccountNum(account_id);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ RoomObstacle::RoomObstacle():Obstacle()
|
|||||||
|
|
||||||
RoomObstacle::~RoomObstacle()
|
RoomObstacle::~RoomObstacle()
|
||||||
{
|
{
|
||||||
|
SetDestorying();
|
||||||
if (!detached_) {
|
if (!detached_) {
|
||||||
if (master.Get()) {
|
if (master.Get()) {
|
||||||
master.Get()->SlaveOnRemove(this);
|
master.Get()->SlaveOnRemove(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user