This commit is contained in:
aozhiwei 2020-07-15 15:01:45 +08:00
parent af72a55260
commit 7a9c58ff93
2 changed files with 3 additions and 1 deletions

View File

@ -716,8 +716,10 @@ void AndroidNewAI::DoShotNewAI()
shot_dir.Rotate(ai_meta->i->shot_offset_angle() / -180.0f); shot_dir.Rotate(ai_meta->i->shot_offset_angle() / -180.0f);
} }
} }
a8::Vec2 old_attack_dir = myself->attack_dir;
myself->attack_dir = shot_dir; myself->attack_dir = shot_dir;
myself->Shot(shot_dir, shot_ok); myself->Shot(shot_dir, shot_ok);
myself->attack_dir = old_attack_dir;
if (shot_ok) { if (shot_ok) {
if (node_.shot_times <= 0) { if (node_.shot_times <= 0) {
node_.start_shot_frameno = myself->room->GetFrameNo(); node_.start_shot_frameno = myself->room->GetFrameNo();

View File

@ -2914,7 +2914,7 @@ void Room::InitAndroidAI()
for (Android* hum : androids) { for (Android* hum : androids) {
#ifdef DEBUG #ifdef DEBUG
#if 0 #if 0
hum->SetAiLevel(2); hum->SetAiLevel(3);
continue; continue;
#endif #endif
#endif #endif