From 211132be950db3d94811e2cdf0a349d468b3a824 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Sep 2014 22:10:35 +0300 Subject: Add server feature haveEightDirections. --- src/resources/db/itemdb.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/resources/db/itemdb.cpp') diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 7dfecb6ae..5f0b377b1 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -35,6 +35,9 @@ #include "resources/db/itemdbstat.h" +#include "net/net.h" +#include "net/serverfeatures.h" + #include "utils/delete2.h" #include "utils/dtor.h" @@ -672,7 +675,7 @@ static int parseDirectionName(const std::string &name) int id = -1; if (name == "down") { - if (serverVersion > 0) + if (Net::getServerFeatures()->haveEightDirections()) id = SpriteDirection::DOWN; else id = -2; @@ -691,7 +694,7 @@ static int parseDirectionName(const std::string &name) } else if (name == "up") { - if (serverVersion > 0) + if (Net::getServerFeatures()->haveEightDirections()) id = SpriteDirection::UP; else id = -3; -- cgit v1.2.3-70-g09d2