diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-04-06 02:44:47 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-04-06 18:08:24 +0200 |
commit | d78161e59e6b711d1dbf148c1a831b7c4b3f4945 (patch) | |
tree | cd90562bf37c912e8cc305cbbfa03c582f2d7b0b | |
parent | 0bcc88159aee0e680d4cdc2949b24b10b571135f (diff) | |
download | manaplus-ml_face_target_direction.tar.gz manaplus-ml_face_target_direction.tar.bz2 manaplus-ml_face_target_direction.tar.xz manaplus-ml_face_target_direction.zip |
ML: turn to face target when attacking and server-side attack is off.ml_face_target_direction
Git blame for this says that Hercules does this on its own, but this is
only true if server side attack is enabled. Using that setting results in
archers being warped into targets, so its use is discouraged.
End of unit_attack_timer_sub in Hercules:src/map/unit.c has unit
direction updates gated on ud->state.attack_continue.
-rw-r--r-- | src/being/localplayer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 1e2f16bea..be99de500 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -829,8 +829,8 @@ void LocalPlayer::attack(Being *const target, return; } -#ifdef TMWA_SUPPORT - if (Net::getNetworkType() == ServerType::TMWATHENA) + if ((mServerAttack == Keep_false) || + (Net::getNetworkType() == ServerType::TMWATHENA)) { const int dist_x = target->mX - mX; const int dist_y = target->mY - mY; @@ -850,7 +850,6 @@ void LocalPlayer::attack(Being *const target, setDirection(BeingDirection::LEFT); } } -#endif // TMWA_SUPPORT mActionTime = tick_time; |