From 17079ba53d5f342a41ce1989ff0704021733b0e4 Mon Sep 17 00:00:00 2001 From: PatrikLundell Date: Mon, 3 Jun 2024 13:07:03 +0200 Subject: [PATCH] use local coordinates instead of global --- src/avatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;