diff --git a/src/avatar.cpp b/src/avatar.cpp index b1d98d8142cf3..ac91701475aa2 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -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;