This commit is contained in:
aozhiwei 2020-06-05 11:05:16 +08:00
parent 1ad7610ce7
commit 45acd5264e

View File

@ -271,9 +271,13 @@ void AndroidAI::UpdateNewBieRoomLogic()
huma->IsAndroid() && huma->IsAndroid() &&
hum->team_id != huma->team_id && hum->team_id != huma->team_id &&
!a8::HasBitFlag(huma->status, HS_Disable)) { !a8::HasBitFlag(huma->status, HS_Disable)) {
if (hum->GetPos().ManhattanDistance(huma->GetPos()) < if (!target) {
hum->GetPos().ManhattanDistance(target->GetPos())) {
target = huma; target = huma;
} else {
if (hum->GetPos().ManhattanDistance(huma->GetPos()) <
hum->GetPos().ManhattanDistance(target->GetPos())) {
target = huma;
}
} }
} }
return true; return true;