This commit is contained in:
aozhiwei 2023-06-14 17:59:41 +08:00
parent 2c5c1971ed
commit 076d21341b

View File

@ -455,6 +455,9 @@ Human* Room::FindEnemy(Human* hum, float range)
if (!hum->dead &&
!a8::HasBitFlag(hum->status, CS_Disable) &&
hum->team_id != myself->team_id) {
if (a8::HasBitFlag(hum->status, CS_DisableAttackAndroid) &&
target->IsAndroid()) {
} else {
float distance = hum->GetPos().Distance2D2(myself->GetPos());
if (distance <= range) {
if (distance < last_distance) {
@ -463,6 +466,7 @@ Human* Room::FindEnemy(Human* hum, float range)
}
}
}
}
return true;
});
return target;