summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp7
-rw-r--r--src/being/localplayer.cpp4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 6ed83429e..dfb337598 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -69,6 +69,7 @@
#include "net/gamehandler.h"
#include "net/homunculushandler.h"
#include "net/mercenaryhandler.h"
+#include "net/net.h"
#include "net/npchandler.h"
#include "net/packetlimiter.h"
#include "net/playerhandler.h"
@@ -949,8 +950,7 @@ void Being::handleAttack(Being *restrict const victim,
reset();
mActionTime = tick_time;
- if (serverFeatures &&
- !serverFeatures->haveAttackDirections() &&
+ if (Net::getNetworkType() == ServerType::TMWATHENA &&
this != localPlayer)
{
const uint8_t dir = calcDirection(victim->mX,
@@ -1053,7 +1053,8 @@ void Being::handleSkill(Being *restrict const victim,
reset();
mActionTime = tick_time;
- if (!serverFeatures->haveAttackDirections() && this != localPlayer)
+ if (Net::getNetworkType() == ServerType::TMWATHENA &&
+ this != localPlayer)
{
const uint8_t dir = calcDirection(victim->mX,
victim->mY);
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 3f31a7c15..81eb8f2c1 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -797,7 +797,8 @@ void LocalPlayer::attack(Being *const target, const bool keep,
return;
}
- if (!serverFeatures->haveAttackDirections())
+#ifdef TMWA_SUPPORT
+ if (Net::getNetworkType() == ServerType::TMWATHENA)
{
if (abs(dist_y) >= abs(dist_x))
{
@@ -814,6 +815,7 @@ void LocalPlayer::attack(Being *const target, const bool keep,
setDirection(BeingDirection::LEFT);
}
}
+#endif // TMWA_SUPPORT
mActionTime = tick_time;