From e0de8a124bf94b79d9d64e5406b21e8598a05d56 Mon Sep 17 00:00:00 2001 From: Roderic Morris Date: Thu, 2 Jul 2009 20:51:41 -0400 Subject: Fix building the ea client. --- src/player.cpp | 28 ++++++++++++++-------------- src/player.h | 9 +++++---- 2 files changed, 19 insertions(+), 18 deletions(-) (limited to 'src') 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; @@ -96,6 +92,11 @@ class Player : public Being void flash(int time); #ifdef TMWSERV_SUPPORT + /** + * Returns the path to the player's current destination + */ + Path findPath(); + /** * Adds a guild to the player. */ -- cgit v1.2.3-70-g09d2