This commit is contained in:
aozhiwei 2019-07-18 14:01:29 +08:00
parent cd0d0726ae
commit c573265b9c

View File

@ -134,6 +134,11 @@ void AndroidAI::DoAttack()
shot_dir.Normalize();
shot_dir.Rotate((rand() % 10) / 180.0f);
sender->attack_dir = shot_dir;
if (sender->curr_weapon->meta->NeedTrace()) {
sender->shot_target_id = enemy->entity_uniid;
} else {
sender->shot_target_id = 0;
}
sender->Shot();
}
}