diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-01 00:58:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-01 00:58:18 +0300 |
commit | 618eb708d5ca59039cb978099c7606760a5fca5b (patch) | |
tree | d595d90f07e078cf3022fd98a830108e2034e5da | |
parent | 873d1fdb25b495633a45915f7f1dd6643cc807c8 (diff) | |
download | manaplus-618eb708d5ca59039cb978099c7606760a5fca5b.tar.gz manaplus-618eb708d5ca59039cb978099c7606760a5fca5b.tar.bz2 manaplus-618eb708d5ca59039cb978099c7606760a5fca5b.tar.xz manaplus-618eb708d5ca59039cb978099c7606760a5fca5b.zip |
Remove ServerFeatures haveBrokenAttackDistance because it depend only on server type.
-rw-r--r-- | src/being/localplayer.cpp | 7 | ||||
-rw-r--r-- | src/net/eathena/serverfeatures.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/serverfeatures.h | 2 | ||||
-rw-r--r-- | src/net/serverfeatures.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/serverfeatures.cpp | 5 | ||||
-rw-r--r-- | src/net/tmwa/serverfeatures.h | 2 |
6 files changed, 3 insertions, 20 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index f3ec36a14..730421b70 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -1285,8 +1285,8 @@ void LocalPlayer::moveToTarget(int dist) dist = settings.moveToTargetType; if (dist != 0) { - const bool broken = serverFeatures - ->haveBrokenPlayerAttackDistance(); + const bool broken = (Net::getNetworkType() == + ServerType::TMWATHENA); switch (dist) { case 10: @@ -2254,8 +2254,7 @@ void LocalPlayer::attack2(Being *const target, const bool keep, if (!dontChangeEquipment && target) changeEquipmentBeforeAttack(target); - const bool broken = serverFeatures - ->haveBrokenPlayerAttackDistance(); + const bool broken = (Net::getNetworkType() == ServerType::TMWATHENA); // probably need cache getPathLength(target) if ((!target || settings.attackType == 0 || settings.attackType == 3) diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index 924a588d3..edd4498f9 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -51,11 +51,6 @@ bool ServerFeatures::havePlayerStatusUpdate() const return serverVersion > 0; } -bool ServerFeatures::haveBrokenPlayerAttackDistance() const -{ - return false; -} - bool ServerFeatures::haveNativeGuilds() const { return true; diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index 5d0da137e..91d59345d 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -40,8 +40,6 @@ class ServerFeatures final : public Net::ServerFeatures bool havePlayerStatusUpdate() const override final; - bool haveBrokenPlayerAttackDistance() const override final A_CONST; - bool haveNativeGuilds() const override final A_CONST; bool haveIncompleteChatMessages() const override final A_CONST; diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h index 2262f2dcc..009c5cee1 100644 --- a/src/net/serverfeatures.h +++ b/src/net/serverfeatures.h @@ -42,8 +42,6 @@ class ServerFeatures notfinal virtual bool havePlayerStatusUpdate() const = 0; - virtual bool haveBrokenPlayerAttackDistance() const = 0; - virtual bool haveNativeGuilds() const = 0; virtual bool haveIncompleteChatMessages() const = 0; diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp index a413e2f19..8cd73884c 100644 --- a/src/net/tmwa/serverfeatures.cpp +++ b/src/net/tmwa/serverfeatures.cpp @@ -49,11 +49,6 @@ bool ServerFeatures::havePlayerStatusUpdate() const return false; } -bool ServerFeatures::haveBrokenPlayerAttackDistance() const -{ - return true; -} - bool ServerFeatures::haveNativeGuilds() const { return false; diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h index 1cd4feb2d..0f0b43547 100644 --- a/src/net/tmwa/serverfeatures.h +++ b/src/net/tmwa/serverfeatures.h @@ -40,8 +40,6 @@ class ServerFeatures final : public Net::ServerFeatures bool havePlayerStatusUpdate() const override final A_CONST; - bool haveBrokenPlayerAttackDistance() const override final A_CONST; - bool haveNativeGuilds() const override final; bool haveIncompleteChatMessages() const override final; |