Skip to content

Commit

Permalink
Merge pull request #74287 from PatrikLundell/aim_cache
Browse files Browse the repository at this point in the history
use local coordinates instead of global in avatar::rebuild_aim_cache()
  • Loading branch information
Maleclypse authored Jun 4, 2024
2 parents c0e803d + 17079ba commit 7147e5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/avatar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ void avatar::rebuild_aim_cache()
// todo: this is not the correct weapon when aiming with fake items
item *weapon = get_wielded_item() ? &*get_wielded_item() : &null_item_reference();
// calc steadiness with player recoil (like they are taking a regular shot not careful etc.
float range = 3.0f - 2.8f * calc_steadiness( *this, *weapon, last_target_pos.value(), recoil );
float range = 3.0f - 2.8f * calc_steadiness( *this, *weapon, local_last_target, recoil );

// pin between pi and negative pi
float upper_bound = base_angle + range;
Expand Down

0 comments on commit 7147e5d

Please sign in to comment.