This commit is contained in:
aozhiwei 2022-10-10 21:52:41 +08:00
parent 7e7e3e9b2d
commit 8d7ccc52f1
3 changed files with 3 additions and 5 deletions

View File

@ -233,7 +233,7 @@ void AndroidAI::DoAttackOldAI()
shot_dir.Rotate((rand() % 10) / 180.0f); shot_dir.Rotate((rand() % 10) / 180.0f);
sender->SetAttackDir(shot_dir); sender->SetAttackDir(shot_dir);
bool shot_ok = false; bool shot_ok = false;
sender->Shot(shot_dir, shot_ok, DEFAULT_FLY_DISTANCE, 0); sender->Shot(shot_dir, shot_ok, 0, 0);
} }
old_ai_data_->last_target.Attach(enemy); old_ai_data_->last_target.Attach(enemy);
} }
@ -646,7 +646,7 @@ void AndroidAI::DoShotNewAI()
} }
a8::Vec2 old_attack_dir = myself->GetAttackDir(); a8::Vec2 old_attack_dir = myself->GetAttackDir();
myself->SetAttackDir(shot_dir); myself->SetAttackDir(shot_dir);
myself->Shot(shot_dir, shot_ok, DEFAULT_FLY_DISTANCE, 0); myself->Shot(shot_dir, shot_ok, 0, 0);
myself->SetAttackDir(old_attack_dir); myself->SetAttackDir(old_attack_dir);
if (shot_ok) { if (shot_ok) {
if (node_->shot_times <= 0) { if (node_->shot_times <= 0) {

View File

@ -553,8 +553,6 @@ const long long SPEC_MAP_OBJECT_FLAGS =
kColliderSpecTag_End kColliderSpecTag_End
); );
const float DEFAULT_FLY_DISTANCE = 5.0f;
const int MAP_BLOCK_START_ID = 1000000000; const int MAP_BLOCK_START_ID = 1000000000;
const int ANDROID_AI_ID_START = 10001; const int ANDROID_AI_ID_START = 10001;

View File

@ -510,7 +510,7 @@ void HeroAI::DoShotAI()
} }
a8::Vec2 old_attack_dir = myself->GetAttackDir(); a8::Vec2 old_attack_dir = myself->GetAttackDir();
myself->SetAttackDir(shot_dir); myself->SetAttackDir(shot_dir);
myself->Shot(shot_dir, shot_ok, DEFAULT_FLY_DISTANCE, 0); myself->Shot(shot_dir, shot_ok, 0, 0);
myself->SetAttackDir(old_attack_dir); myself->SetAttackDir(old_attack_dir);
if (shot_ok) { if (shot_ok) {
if (node_->shot_times <= 0) { if (node_->shot_times <= 0) {