1
This commit is contained in:
parent
2c5c1971ed
commit
076d21341b
@ -455,11 +455,15 @@ Human* Room::FindEnemy(Human* hum, float range)
|
||||
if (!hum->dead &&
|
||||
!a8::HasBitFlag(hum->status, CS_Disable) &&
|
||||
hum->team_id != myself->team_id) {
|
||||
float distance = hum->GetPos().Distance2D2(myself->GetPos());
|
||||
if (distance <= range) {
|
||||
if (distance < last_distance) {
|
||||
target = hum;
|
||||
last_distance = distance;
|
||||
if (a8::HasBitFlag(hum->status, CS_DisableAttackAndroid) &&
|
||||
target->IsAndroid()) {
|
||||
} else {
|
||||
float distance = hum->GetPos().Distance2D2(myself->GetPos());
|
||||
if (distance <= range) {
|
||||
if (distance < last_distance) {
|
||||
target = hum;
|
||||
last_distance = distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user