This commit is contained in:
aozhiwei 2023-05-31 14:10:52 +08:00
parent 20b99871f3
commit e1a384aae8

View File

@ -628,7 +628,7 @@ void Player::Shot()
glm::vec3 old_attack_dir = GetAttackDir();
if (std::fabs(shot_client_pos->x - GetPos().GetX()) < 60.0f &&
std::fabs(shot_client_pos->y - GetPos().GetY()) < 5.0f &&
std::fabs(shot_client_pos->y - GetPos().GetZ()) < 60.0f) {
std::fabs(shot_client_pos->z - GetPos().GetZ()) < 60.0f) {
glm::vec3 new_attack_dir = *shot_target_pos - GetPos().ToGlmVec3();
GlmHelper::Normalize(new_attack_dir);
SetAttackDir(new_attack_dir);