From 57d1d278ff141d766664073e47bc1a1b7e8713fe Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 3 Jun 2020 14:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ClearFrameData?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/human.cc | 49 ++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 1f8b45f..33b252d 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1796,38 +1796,35 @@ void Human::ClearFrameData() new_objects.clear(); } if (!del_objects.empty()) { - if (!a8::HasBitFlag(status, HS_Disable)) { - for (auto& itr : del_objects) { - Entity* entity = room->GetEntityByUniId(itr); - if (entity) { - RemovePartObjects(entity); - if (entity->IsEntityType(ET_Player)) { - ((Human*)entity)->RemovePartObjects(this); - } -#ifdef DEBUG - room->CheckPartObjects(); -#endif - } - } - } - del_objects.clear(); - } - if (!out_objects.empty()) { - if (!a8::HasBitFlag(status, HS_Disable)) { - for (auto& itr : out_objects) { - Entity* entity = room->GetEntityByUniId(itr); - if (entity) { - RemovePartObjects(entity); - if (entity->IsEntityType(ET_Player)) { - Human* hum = (Human*)entity; - hum->RemovePartObjects(this); - } + for (auto& itr : del_objects) { + Entity* entity = room->GetEntityByUniId(itr); + if (entity) { + RemovePartObjects(entity); + if (entity->IsEntityType(ET_Player)) { + Human* hum = (Human*)entity; + hum->RemovePartObjects(this); } #ifdef DEBUG room->CheckPartObjects(); #endif } } + del_objects.clear(); + } + if (!out_objects.empty()) { + for (auto& itr : out_objects) { + Entity* entity = room->GetEntityByUniId(itr); + if (entity) { + RemovePartObjects(entity); + if (entity->IsEntityType(ET_Player)) { + Human* hum = (Human*)entity; + hum->RemovePartObjects(this); + } + } +#ifdef DEBUG + room->CheckPartObjects(); +#endif + } out_objects.clear(); } if (!shots_.empty()) {