Ranger should be the only one updating the ranger-specific shooting animation

This commit is contained in:
Nic0Nic0Nii 2023-07-25 21:34:38 +00:00
parent 97e2804a6a
commit bcbc10cb7c

View File

@ -544,6 +544,7 @@ void Player::SetVelocity(vf2d vel){
}
void Player::SetAnimationBasedOnTargetingDirection(float targetDirection){
if(GetClass()==Class::RANGER){
if(targetDirection<=PI/4&&targetDirection>-PI/4){
UpdateAnimation(AnimationState::RANGER_SHOOT_E);
} else
@ -557,3 +558,4 @@ void Player::SetAnimationBasedOnTargetingDirection(float targetDirection){
UpdateAnimation(AnimationState::RANGER_SHOOT_N);
}
}
}