diff --git a/server/gameserver/entity.cc b/server/gameserver/entity.cc index 40d6131..6ac7fb4 100644 --- a/server/gameserver/entity.cc +++ b/server/gameserver/entity.cc @@ -107,6 +107,16 @@ void Entity::BroadcastFullState(Room* room) void Entity::BroadcastDeleteState(Room* room) { + #if 1 + room->TouchHumanList + ( + a8::XParams(), + [this] (Human* hum, a8::XParams& param) -> bool + { + hum->RemoveObjects(this); + return true; + }); + #else std::set tmp_grids; room->grid_service->GetAllCells(room, grid_id_, tmp_grids); room->grid_service->TouchAllLayerHumanList @@ -117,6 +127,7 @@ void Entity::BroadcastDeleteState(Room* room) { hum->RemoveObjects(this); }); + #endif } void Entity::RemoveFromAroundPlayers(Room* room) diff --git a/server/gameserver/hero.cc b/server/gameserver/hero.cc index aee20ef..fed7915 100644 --- a/server/gameserver/hero.cc +++ b/server/gameserver/hero.cc @@ -309,8 +309,8 @@ void Hero::BeKill(int killer_id, const std::string& killer_name, int weapon_id) hero->delete_frameno = hero->room->GetFrameNo(); std::vector watch_list; hero->room->GetPartObjectWatchList(hero, watch_list); - if (watch_list.empty()) { - + if (!watch_list.empty()) { + abort(); } }, &xtimer_attacher.timer_list_);