1
This commit is contained in:
parent
2c5c1971ed
commit
076d21341b
@ -455,6 +455,9 @@ 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) {
|
||||||
|
if (a8::HasBitFlag(hum->status, CS_DisableAttackAndroid) &&
|
||||||
|
target->IsAndroid()) {
|
||||||
|
} else {
|
||||||
float distance = hum->GetPos().Distance2D2(myself->GetPos());
|
float distance = hum->GetPos().Distance2D2(myself->GetPos());
|
||||||
if (distance <= range) {
|
if (distance <= range) {
|
||||||
if (distance < last_distance) {
|
if (distance < last_distance) {
|
||||||
@ -463,6 +466,7 @@ Human* Room::FindEnemy(Human* hum, float range)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
return target;
|
return target;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user