summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-21 03:23:28 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-21 03:23:28 +0300
commit54f8367afe9d30c21bcda057872439199c7dd9c1 (patch)
tree63d0f02eca1cfd643e4a394c7999c9c172839086 /src/localplayer.cpp
parent61350cc4f65d53dd3add0c15558f6017b18ddbea (diff)
downloadplus-54f8367afe9d30c21bcda057872439199c7dd9c1.tar.gz
plus-54f8367afe9d30c21bcda057872439199c7dd9c1.tar.bz2
plus-54f8367afe9d30c21bcda057872439199c7dd9c1.tar.xz
plus-54f8367afe9d30c21bcda057872439199c7dd9c1.zip
Fix player build path in special collisions.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 544c67f97..9cae5d094 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -912,7 +912,7 @@ bool LocalPlayer::pickUp(FloorItem *item)
Path debugPath = mMap->findPath(
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
- item->getTileX(), item->getTileY(), 0x00, 0);
+ item->getTileX(), item->getTileY(), getWalkMask(), 0);
if (!debugPath.empty())
navigateTo(item->getTileX(), item->getTileY());
else
@@ -1725,7 +1725,7 @@ void LocalPlayer::moveToTarget(unsigned int dist)
{
debugPath = mMap->findPath(static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
- mTarget->getTileX(), mTarget->getTileY(), 0x00, 0);
+ mTarget->getTileX(), mTarget->getTileY(), getWalkMask(), 0);
if (debugPath.size() < dist)
return;
@@ -2592,7 +2592,7 @@ bool LocalPlayer::isReachable(int x, int y, int maxCost)
Path debugPath = mMap->findPath(
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
- x, y, 0x00, maxCost);
+ x, y, getWalkMask(), maxCost);
return !debugPath.empty();
}
@@ -2627,7 +2627,7 @@ bool LocalPlayer::isReachable(Being *being, int maxCost)
Path debugPath = mMap->findPath(
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
- being->getTileX(), being->getTileY(), 0x00, maxCost);
+ being->getTileX(), being->getTileY(), getWalkMask(), maxCost);
being->setDistance(static_cast<int>(debugPath.size()));
if (!debugPath.empty())
@@ -3221,7 +3221,7 @@ bool LocalPlayer::navigateTo(int x, int y)
mNavigatePath = mMap->findPath(
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
- x, y, 0x00, 0);
+ x, y, getWalkMask(), 0);
if (mDrawPath)
tmpLayer->addRoad(mNavigatePath);
@@ -3250,7 +3250,7 @@ void LocalPlayer::navigateTo(Being *being)
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
being->getTileX(), being->getTileY(),
- 0x00, 0);
+ getWalkMask(), 0);
if (mDrawPath)
tmpLayer->addRoad(mNavigatePath);
@@ -3396,7 +3396,7 @@ int LocalPlayer::getPathLength(Being* being)
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
being->getTileX(), being->getTileY(),
- 0x00, 0);
+ getWalkMask(), 0);
return static_cast<int>(debugPath.size());
}
@@ -3735,7 +3735,7 @@ void LocalPlayer::fixAttackTarget()
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,
mTarget->getTileX(), mTarget->getTileY(),
- 0x00, 0);
+ getWalkMask(), 0);
if (!debugPath.empty())
{