diff options
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/player.cpp b/src/player.cpp index 520342e3..597fb14b 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -149,6 +149,20 @@ 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; |