summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-05 17:43:09 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-05 17:43:09 +0300
commit1cbf33d3e77b119aa0743551bd68ae0aa55d36c9 (patch)
treef698ad5c31ac88fe6d3af2827a5af6244068397f /src/being
parente6e26d83c4aa11ab3c78fc1faa0da7c090358974 (diff)
downloadplus-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.tar.gz
plus-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.tar.bz2
plus-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.tar.xz
plus-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.zip
Remove function moveTo from LocalPlayer.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp15
-rw-r--r--src/being/localplayer.h2
2 files changed, 5 insertions, 12 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 831d2a0d8..b77d34f22 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -261,7 +261,7 @@ void LocalPlayer::logic()
if ((*i).x == mX && (*i).y == mY)
mNavigatePath.pop_front();
else
- moveTo((*i).x, (*i).y);
+ setDestination((*i).x, (*i).y);
}
}
@@ -1097,15 +1097,10 @@ void LocalPlayer::attributeChanged(const int id,
}
}
-void LocalPlayer::moveTo(const int x, const int y)
-{
- setDestination(x, y);
-}
-
void LocalPlayer::move(const int dX, const int dY)
{
mPickUpTarget = nullptr;
- moveTo(mX + dX, mY + dY);
+ setDestination(mX + dX, mY + dY);
}
void LocalPlayer::moveToTarget(int dist)
@@ -1196,7 +1191,7 @@ void LocalPlayer::moveToHome()
mPickUpTarget = nullptr;
if ((mX != mCrossX || mY != mCrossY) && mCrossX && mCrossY)
{
- moveTo(mCrossX, mCrossY);
+ setDestination(mCrossX, mCrossY);
}
else if (mMap)
{
@@ -3047,7 +3042,7 @@ void LocalPlayer::fixPos(const int maxDist)
&& (time < mActivityTime || time - mActivityTime > 2))
{
mActivityTime = time;
- moveTo(mCrossX, mCrossY);
+ setDestination(mCrossX, mCrossY);
}
}
@@ -3103,7 +3098,7 @@ void LocalPlayer::fixAttackTarget()
if (!debugPath.empty())
{
const Path::const_iterator i = debugPath.begin();
- moveTo((*i).x, (*i).y);
+ setDestination((*i).x, (*i).y);
}
}
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 5cb29339b..f6813a171 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -212,8 +212,6 @@ class LocalPlayer final : public Being,
void crazyMove();
- void moveTo(const int x, const int y);
-
void move(const int dX, const int dY);
void moveToTarget(int dist = -1);