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