summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 9661dc2fe..bc325abe8 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -137,23 +137,10 @@ class SortBeingFunctor final
return being1->getDistance() < being2->getDistance();
}
- int d1, d2;
-#ifdef MANASERV_SUPPORT
- if (Net::getNetworkType() == ServerInfo::MANASERV)
- {
- const Vector &pos1 = being1->getPosition();
- d1 = abs((static_cast<int>(pos1.x)) - x)
- + abs((static_cast<int>(pos1.y)) - y);
- const Vector &pos2 = being2->getPosition();
- d2 = abs((static_cast<int>(pos2.x)) - x)
- + abs((static_cast<int>(pos2.y)) - y);
- }
- else
-#endif
- {
- d1 = abs(being1->getTileX() - x) + abs(being1->getTileY() - y);
- d2 = abs(being2->getTileX() - x) + abs(being2->getTileY() - y);
- }
+ const int d1 = abs(being1->getTileX() - x)
+ + abs(being1->getTileY() - y);
+ const int d2 = abs(being2->getTileX() - x)
+ + abs(being2->getTileY() - y);
if (d1 != d2)
return d1 < d2;
@@ -1269,7 +1256,7 @@ void ActorManager::printAllToChat() const
}
void ActorManager::printBeingsToChat(const ActorSprites &beings,
- const std::string &header) const
+ const std::string &header)
{
if (!debugChatTab)
return;
@@ -1294,7 +1281,7 @@ void ActorManager::printBeingsToChat(const ActorSprites &beings,
}
void ActorManager::printBeingsToChat(const std::vector<Being*> &beings,
- const std::string &header) const
+ const std::string &header)
{
if (!debugChatTab)
return;