1
This commit is contained in:
parent
09ccefb3cd
commit
44cd830ee0
@ -555,13 +555,9 @@ void AndroidNewAI::UpdatePursuit()
|
||||
Human* myself = (Human*)owner;
|
||||
float distance = myself->GetPos().Distance(node_.target->GetPos());
|
||||
if (distance < GetAttackRange()) {
|
||||
#if 0
|
||||
UpdateAttack();
|
||||
#else
|
||||
ChangeToStateNewAI(ASE_Attack);
|
||||
#endif
|
||||
} else {
|
||||
if (node_.exec_frame_num > 100) {
|
||||
if (node_.exec_frame_num > 100 * 2) {
|
||||
ChangeToStateNewAI(ASE_RandomWalk);
|
||||
}
|
||||
}
|
||||
@ -581,7 +577,8 @@ void AndroidNewAI::DoMoveNewAI()
|
||||
hum->_UpdateMove(speed);
|
||||
hum->on_move_collision = nullptr;
|
||||
if (node_.nearest_human) {
|
||||
if (hum->GetPos().ManhattanDistance(node_.nearest_human->GetPos()) < 200) {
|
||||
if (node_.main_state != ASE_Pursuit &&
|
||||
hum->GetPos().ManhattanDistance(node_.nearest_human->GetPos()) < 200) {
|
||||
ChangeToStateNewAI(ASE_Thinking);
|
||||
} else if (hum->GetPos().ManhattanDistance(node_.nearest_human->GetPos()) > 800) {
|
||||
GetTarget();
|
||||
|
Loading…
x
Reference in New Issue
Block a user