mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'crabman/precision-fix' into 'master'
Don't use attacker orientation for calculating melee precision See merge request veloren/veloren!4191
This commit is contained in:
commit
b1a7c71f23
@ -220,8 +220,12 @@ impl<'a> System<'a> for Sys {
|
|||||||
target,
|
target,
|
||||||
);
|
);
|
||||||
|
|
||||||
let precision_from_flank =
|
// Note: Don't use ori.look_vec() here, it leads to incorrect results for wide
|
||||||
combat::precision_mult_from_flank(*ori.look_dir(), target_ori);
|
// angle melee attacks
|
||||||
|
let precision_from_flank = combat::precision_mult_from_flank(
|
||||||
|
(pos_b.0 - pos.0).try_normalized().unwrap_or(ori.look_vec()),
|
||||||
|
target_ori,
|
||||||
|
);
|
||||||
|
|
||||||
let precision_from_poise = {
|
let precision_from_poise = {
|
||||||
if let Some(CharacterState::Stunned(data)) = target_char_state {
|
if let Some(CharacterState::Stunned(data)) = target_char_state {
|
||||||
|
Loading…
Reference in New Issue
Block a user