This commit is contained in:
aozhiwei 2023-11-13 19:38:29 +08:00
parent 7ba386ecb3
commit 9f76eb66d0

View File

@ -174,7 +174,8 @@ void HeroAgent::ShotNormal(const glm::vec3& dir)
bool shot_ok = false;
glm::vec3 shot_dir = owner_->GetAttackDir();
if (bullet_angle_offset_max_ > 0) {
GlmHelper::RotateY(shot_dir, a8::RandEx(bullet_angle_offset_min_, bullet_angle_offset_max_));
GlmHelper::RotateY(shot_dir, a8::RandEx(bullet_angle_offset_min_, bullet_angle_offset_max_)/180.0);
owner_->SetAttackDir(shot_dir);
}
if (bullet_trace_mode_) {
owner_->Shot(shot_dir, shot_ok, 0, 0);