diff --git a/src/enemy.cpp b/src/enemy.cpp index 52ffd34..bacc884 100644 --- a/src/enemy.cpp +++ b/src/enemy.cpp @@ -28,7 +28,7 @@ void Enemy::_ready() { void Enemy::_process(double delta) { this->set_current_state_name(this->current_state_name); - float const angle_left{gd::Math::wrapf(this->target_rotation - this->get_rotation().y, -M_2_PIf, M_2_PIf)}; + float const angle_left{gd::Math::wrapf(this->target_rotation - this->get_rotation().y, -M_PIf, M_PIf)}; float const step(gd::Math::sign(angle_left) * delta * (this->anim_tree->get_current_state().begins_with("Run") ? this->TURN_SPEED : this->AIM_SPEED)); if(gd::Math::abs(angle_left) <= gd::Math::abs(step)) { this->rotate_y(angle_left);