From 58cdec580c18bfe9c73ca1eafdbb426eeddca34f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 10 Jul 2019 19:14:43 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 97b0348..943211a 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1638,7 +1638,14 @@ void Human::SelectSkillTargets(const a8::Vec2& target_pos, std::set& ta break; case ST_EnemyAndObject: { - + for (auto& cell : grid_list) { + for (Human* hum : cell->human_list) { + if ((hum->team_id != team_id) || + hum->pos.Distance(target_pos) < skill_meta->i->skill_distance()) { + target_list.insert(hum); + } + } + } } break; case ST_EnemyAndSelf: