1
This commit is contained in:
parent
63a3cfa766
commit
568e52a485
@ -309,14 +309,12 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
|
|||||||
target_list.insert(this);
|
target_list.insert(this);
|
||||||
TouchAllLayerHumanList
|
TouchAllLayerHumanList
|
||||||
(
|
(
|
||||||
[this, &target_pos, &target_list] (Human* hum, bool& stop)
|
[this, skill, &target_pos, &target_list] (Human* hum, bool& stop)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if ((hum == this || hum->team_id == team_id) &&
|
if ((hum == this || hum->team_id == team_id) &&
|
||||||
hum->GetPos().Distance(target_pos) < skill->meta->i->skill_distance()) {
|
hum->GetPos().Distance(target_pos) < skill->meta->i->skill_distance()) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -324,42 +322,38 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
|
|||||||
{
|
{
|
||||||
TouchAllLayerHumanList
|
TouchAllLayerHumanList
|
||||||
(
|
(
|
||||||
[this, &target_pos, &target_list] (Human* hum, bool& stop)
|
[this, skill, &target_pos, &target_list] (Human* hum, bool& stop)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if ((hum != this && hum->team_id == team_id) &&
|
if ((hum != this && hum->team_id == team_id) &&
|
||||||
hum->GetPos().Distance(target_pos) < skill->i->skill_distance()) {
|
hum->GetPos().Distance(target_pos) < skill->meta->i->skill_distance()) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kST_EnemySingle:
|
case kST_EnemySingle:
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
Entity* entity = room->GetEntityByUniId(skill_target_id_);
|
Entity* entity = room->GetEntityByUniId(skill_target_id_);
|
||||||
if (entity && entity->IsEntityType(ET_Player)) {
|
if (entity && entity->IsEntityType(ET_Player)) {
|
||||||
Human* hum = (Human*)entity;
|
Human* hum = (Human*)entity;
|
||||||
#if 0
|
|
||||||
if (IsEnemy(hum)) {
|
if (IsEnemy(hum)) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kST_EnemyGroup:
|
case kST_EnemyGroup:
|
||||||
{
|
{
|
||||||
TouchAllLayerHumanList
|
TouchAllLayerHumanList
|
||||||
(
|
(
|
||||||
[this, &target_pos, &target_list] (Human* hum, bool& stop)
|
[this, skill, &target_pos, &target_list] (Human* hum, bool& stop)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if ((hum->team_id != team_id) &&
|
if ((hum->team_id != team_id) &&
|
||||||
hum->GetPos().Distance(target_pos) < skill->i->skill_distance()) {
|
hum->GetPos().Distance(target_pos) < skill->meta->i->skill_distance()) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -367,14 +361,12 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
|
|||||||
{
|
{
|
||||||
TouchAllLayerHumanList
|
TouchAllLayerHumanList
|
||||||
(
|
(
|
||||||
[this, &target_pos, &target_list] (Human* hum, bool& stop)
|
[this, skill, &target_pos, &target_list] (Human* hum, bool& stop)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if ((hum->team_id != team_id) &&
|
if ((hum->team_id != team_id) &&
|
||||||
hum->GetPos().Distance(target_pos) < skill->i->skill_distance()) {
|
hum->GetPos().Distance(target_pos) < skill->meta->i->skill_distance()) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -382,14 +374,12 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
|
|||||||
{
|
{
|
||||||
TouchAllLayerHumanList
|
TouchAllLayerHumanList
|
||||||
(
|
(
|
||||||
[this, &target_pos, &target_list] (Human* hum, bool& stop)
|
[this, skill, &target_pos, &target_list] (Human* hum, bool& stop)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if ((hum == this || this->IsEnemy(hum)) &&
|
if ((hum == this || this->IsEnemy(hum)) &&
|
||||||
hum->GetPos().Distance(target_pos) < skill->i->skill_distance()) {
|
hum->GetPos().Distance(target_pos) < skill->meta->i->skill_distance()) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user