From 8d7ccc52f1616966ca1c14eccf95feaf114a73e2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 10 Oct 2022 21:52:41 +0800 Subject: [PATCH] 1 --- server/gameserver/android.ai.cc | 4 ++-- server/gameserver/constant.h | 2 -- server/gameserver/hero.ai.cc | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server/gameserver/android.ai.cc b/server/gameserver/android.ai.cc index e8c28a33..6ff823f6 100644 --- a/server/gameserver/android.ai.cc +++ b/server/gameserver/android.ai.cc @@ -233,7 +233,7 @@ void AndroidAI::DoAttackOldAI() shot_dir.Rotate((rand() % 10) / 180.0f); sender->SetAttackDir(shot_dir); 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); } @@ -646,7 +646,7 @@ void AndroidAI::DoShotNewAI() } a8::Vec2 old_attack_dir = myself->GetAttackDir(); 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); if (shot_ok) { if (node_->shot_times <= 0) { diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index 5d86a5be..f4e0930d 100644 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -553,8 +553,6 @@ const long long SPEC_MAP_OBJECT_FLAGS = kColliderSpecTag_End ); -const float DEFAULT_FLY_DISTANCE = 5.0f; - const int MAP_BLOCK_START_ID = 1000000000; const int ANDROID_AI_ID_START = 10001; diff --git a/server/gameserver/hero.ai.cc b/server/gameserver/hero.ai.cc index bcf17293..999649c5 100644 --- a/server/gameserver/hero.ai.cc +++ b/server/gameserver/hero.ai.cc @@ -510,7 +510,7 @@ void HeroAI::DoShotAI() } a8::Vec2 old_attack_dir = myself->GetAttackDir(); 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); if (shot_ok) { if (node_->shot_times <= 0) {