diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-01 18:28:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-01 18:28:32 +0300 |
commit | 89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3 (patch) | |
tree | f41622c9f4cc27809f00a91140ef8be2a5196051 /src/resources | |
parent | 013e03f7a62c40554d0ed00c30375155557a1318 (diff) | |
download | mv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.tar.gz mv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.tar.bz2 mv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.tar.xz mv-89bc2ec72aa3713fc5a02ec1fcc4ea826043e9c3.zip |
Remove ServerFeatures haveEightDirections because it depend only on server type.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/db/itemdb.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 94c9b14b8..e0616090d 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -39,6 +39,7 @@ #include "resources/sprite/spritereference.h" +#include "net/net.h" #include "net/serverfeatures.h" #include "utils/checkutils.h" @@ -780,10 +781,12 @@ static int parseDirectionName(const std::string &name) int id = -1; if (name == "down") { - if (serverFeatures->haveEightDirections()) - id = SpriteDirection::DOWN; - else +#ifdef TMWA_SUPPORT + if (Net::getNetworkType() == ServerType::TMWATHENA) id = -2; + else +#endif + id = SpriteDirection::DOWN; } else if (name == "downleft" || name == "leftdown") { @@ -799,10 +802,12 @@ static int parseDirectionName(const std::string &name) } else if (name == "up") { - if (serverFeatures->haveEightDirections()) - id = SpriteDirection::UP; - else +#ifdef TMWA_SUPPORT + if (Net::getNetworkType() == ServerType::TMWATHENA) id = -3; + else +#endif + id = SpriteDirection::UP; } else if (name == "upright" || name == "rightup") { |