From d78161e59e6b711d1dbf148c1a831b7c4b3f4945 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Sun, 6 Apr 2025 02:44:47 +0200 Subject: ML: turn to face target when attacking and server-side attack is off. 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. --- src/being/localplayer.cpp | 5 ++--- 1 file 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; -- cgit v1.2.3-70-g09d2