From a39bab2e4b7fad4266c5365357e397ab2bdc8e8c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 3 Jun 2020 16:53:39 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 40 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 33b252d..5f4237f 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1796,34 +1796,38 @@ void Human::ClearFrameData() new_objects.clear(); } if (!del_objects.empty()) { - 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); - } + 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* hum = (Human*)entity; + hum->RemovePartObjects(this); + } #ifdef DEBUG - room->CheckPartObjects(); + 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); + 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); + } } - } #ifdef DEBUG - room->CheckPartObjects(); + room->CheckPartObjects(); #endif + } } out_objects.clear(); }