This commit is contained in:
azw 2023-11-07 02:22:18 +00:00
parent 6a46d2ce0d
commit 97c500ed87

View File

@ -1025,7 +1025,7 @@ void CallFuncBuff::RangeHoldBuff()
()
{
float range = meta->GetBuffParam2(this);
std::vector<Human*> hit_humans;
std::set<Creature*> hit_humans;
owner->room->TraverseAliveHumanList
(
[this, range] (Human* hum)
@ -1037,16 +1037,7 @@ void CallFuncBuff::RangeHoldBuff()
});
std::vector<Human*> leave_humans;
for (auto& pair : context->in_human_infos) {
bool found = false;
#if 0
for (int i = 0; i < size; ++i){
if (hit_humans[i] == pair.second.c.Get()) {
found = true;
break;
}
}
#endif
if (!found) {
if (hit_humans.find(pair.second.c.Get()) == hit_humans.end()) {
on_leave(pair.second.c.Get()->AsHuman());
leave_humans.push_back(pair.second.c.Get()->AsHuman());
}