This commit is contained in:
aozhiwei 2019-07-10 19:14:43 +08:00
parent ad62d11326
commit 58cdec580c

View File

@ -1638,7 +1638,14 @@ void Human::SelectSkillTargets(const a8::Vec2& target_pos, std::set<Entity*>& ta
break; break;
case ST_EnemyAndObject: 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; break;
case ST_EnemyAndSelf: case ST_EnemyAndSelf: