This commit is contained in:
aozhiwei 2023-03-15 15:36:02 +08:00
parent 659a301965
commit 60cbd67d29

View File

@ -30,8 +30,11 @@ void HideBuff::Activate()
[this] (Creature* target, bool& stop) [this] (Creature* target, bool& stop)
{ {
if (!target->dead && target->team_id != owner->team_id && if (!target->dead && target->team_id != owner->team_id &&
Collision::CheckCC(owner, owner->GetRadius(), Collision::CheckCC(owner,
target, alert_range)) { alert_range,
target,
target->GetRadius()
)) {
AddInRangeObject(target); AddInRangeObject(target);
} }
}); });
@ -71,9 +74,10 @@ void HideBuff::Check()
auto& tuple = pair.second; auto& tuple = pair.second;
if (std::get<2>(tuple) < step_) { if (std::get<2>(tuple) < step_) {
if (Collision::CheckCC(owner, if (Collision::CheckCC(owner,
owner->GetRadius(), alert_range,
std::get<0>(tuple).Get(), std::get<0>(tuple).Get(),
alert_range)) { std::get<0>(tuple).Get()->GetRadius()
)) {
} else { } else {
leave_targets.push_back(pair.first); leave_targets.push_back(pair.first);
} }