summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/player.cpp28
-rw-r--r--src/player.h9
2 files changed, 19 insertions, 18 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 597fb14b..3b2271bd 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -149,20 +149,6 @@ void Player::logic()
}
#endif
-Path Player::findPath()
-{
- Path path;
-
- if (mMap)
- {
- path = mMap->findSimplePath(getPosition().x / 32, getPosition().y / 32,
- getDestination().x / 32, getDestination().y / 32,
- getWalkMask());
- }
-
- return path;
-}
-
Being::Type Player::getType() const
{
return PLAYER;
@@ -270,6 +256,20 @@ void Player::updateCoords()
#ifdef TMWSERV_SUPPORT
+Path Player::findPath()
+{
+ Path path;
+
+ if (mMap)
+ {
+ path = mMap->findSimplePath(getPosition().x / 32, getPosition().y / 32,
+ getDestination().x / 32, getDestination().y / 32,
+ getWalkMask());
+ }
+
+ return path;
+}
+
Guild* Player::addGuild(short guildId, short rights)
{
Guild *guild = new Guild(guildId, rights);
diff --git a/src/player.h b/src/player.h
index 83cb4ec0..cfd305a6 100644
--- a/src/player.h
+++ b/src/player.h
@@ -54,10 +54,6 @@ class Player : public Being
#ifdef EATHENA_SUPPORT
virtual void logic();
#endif
- /**
- * Returns the path to the player's current destination
- */
- Path findPath();
virtual Type getType() const;
@@ -97,6 +93,11 @@ class Player : public Being
#ifdef TMWSERV_SUPPORT
/**
+ * Returns the path to the player's current destination
+ */
+ Path findPath();
+
+ /**
* Adds a guild to the player.
*/
Guild *addGuild(short guildId, short rights);