summaryrefslogtreecommitdiff
path: root/src
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
parente6e26d83c4aa11ab3c78fc1faa0da7c090358974 (diff)
downloadmv-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.tar.gz
mv-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.tar.bz2
mv-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.tar.xz
mv-1cbf33d3e77b119aa0743551bd68ae0aa55d36c9.zip
Remove function moveTo from LocalPlayer.
Diffstat (limited to 'src')
-rw-r--r--src/being/localplayer.cpp15
-rw-r--r--src/being/localplayer.h2
-rw-r--r--src/commands.cpp2
3 files changed, 6 insertions, 13 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);
diff --git a/src/commands.cpp b/src/commands.cpp
index 985c9ae45..071b080a4 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -671,7 +671,7 @@ impHandler1(move)
int y = 0;
if (localPlayer && parse2Int(args, x, y))
- localPlayer->moveTo(x, y);
+ localPlayer->setDestination(x, y);
}
impHandler1(navigate)