This commit is contained in:
aozhiwei 2021-03-15 14:24:12 +08:00
parent d0b378e17d
commit 6780aa53d5
4 changed files with 11 additions and 4 deletions

View File

@ -24,6 +24,7 @@ void AIComponent::SetAiMode(int ai_mode)
int AIComponent::GetAiLevel()
{
return 1;
return ai_level_;
}

View File

@ -475,15 +475,11 @@ void AndroidNewAI::UpdateThinking()
hum->room->IsWaitingStart() ||
hum->HasBuffEffect(kBET_Jump) ||
a8::HasBitFlag(hum->status, HS_DisableAttack)) {
#if 1
if (hum->room->IsWaitingStart()) {
ChangeToStateNewAI(ASE_Idle);
} else {
ChangeToStateNewAI(ASE_RandomWalk);
}
#else
ChangeToStateNewAI(ASE_RandomWalk);
#endif
} else {
Human* target = GetTarget();
if (target) {

View File

@ -60,6 +60,11 @@ void Android::InternalUpdate(int delta_time)
if (action_type != AT_None) {
UpdateAction();
}
if (HasBuffEffect(kBET_Fly)) {
SetPos(room->plane.curr_pos);
room->grid_service->MoveHuman(this);
return;
}
ai->Update(delta_time);
}

View File

@ -55,6 +55,11 @@ void Player::InternalUpdate(int delta_time)
if (poisoning) {
poisoning_time += delta_time;
}
if (HasBuffEffect(kBET_Fly)) {
SetPos(room->plane.curr_pos);
room->grid_service->MoveHuman(this);
return;
}
if (HasSpecMove()) {
_UpdateSpecMove();
} else {