summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-10-04 21:02:59 -0400
committerChuck Miller <shadowmil@gmail.com>2010-10-04 21:17:08 -0400
commit89f192b9039f9c000515f0a12f4bb9fb55c4691c (patch)
tree5d5ae12f7e77921a80082abdf3ec6acc705192c7
parent6f25f5d9390ae247970ad886dc51d55435285831 (diff)
downloadmana-89f192b9039f9c000515f0a12f4bb9fb55c4691c.tar.gz
mana-89f192b9039f9c000515f0a12f4bb9fb55c4691c.tar.bz2
mana-89f192b9039f9c000515f0a12f4bb9fb55c4691c.tar.xz
mana-89f192b9039f9c000515f0a12f4bb9fb55c4691c.zip
Remove the following system
The implamentation is poor, and this is something that would be better handled by the addon engine later down the road. Reviewed-By: Freeyorp < Freeyorp101@hotmail.com >
-rw-r--r--src/game.cpp4
-rw-r--r--src/gui/popupmenu.cpp9
-rw-r--r--src/gui/viewport.cpp1
-rw-r--r--src/localplayer.cpp2
-rw-r--r--src/localplayer.h28
-rw-r--r--src/net/tmwa/beinghandler.cpp20
6 files changed, 0 insertions, 64 deletions
diff --git a/src/game.cpp b/src/game.cpp
index b50d0629..5557f650 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -783,26 +783,22 @@ void Game::handleInput()
(joystick && joystick->isUp()))
{
direction |= Being::UP;
- player_node->cancelFollow();
}
else if (keyboard.isKeyActive(keyboard.KEY_MOVE_DOWN) ||
(joystick && joystick->isDown()))
{
direction |= Being::DOWN;
- player_node->cancelFollow();
}
if (keyboard.isKeyActive(keyboard.KEY_MOVE_LEFT) ||
(joystick && joystick->isLeft()))
{
direction |= Being::LEFT;
- player_node->cancelFollow();
}
else if (keyboard.isKeyActive(keyboard.KEY_MOVE_RIGHT) ||
(joystick && joystick->isRight()))
{
direction |= Being::RIGHT;
- player_node->cancelFollow();
}
if (keyboard.isKeyActive(keyboard.KEY_EMOTE) && direction != 0)
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index e2257388..3d389374 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -125,9 +125,6 @@ void PopupMenu::showPopup(int x, int y, Being *being)
break;
}
- mBrowserBox->addRow(strprintf("@@follow|%s@@",
- strprintf(_("Follow %s"),
- name.c_str()).c_str()));
if (player_node->getNumberOfGuilds())
mBrowserBox->addRow(strprintf("@@guild|%s@@",
strprintf(_("Invite %s to join your guild"),
@@ -255,12 +252,6 @@ void PopupMenu::handleLink(const std::string &link)
player_node->inviteToGuild(being);
}
- // Follow Player action
- else if (link == "follow" && being)
- {
- player_node->setFollow(being->getName());
- }
-
// Pick Up Floor Item action
else if ((link == "pickup") && mFloorItem)
{
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 972920a5..0209b13f 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -413,7 +413,6 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
else
{
player_node->stopAttack();
- player_node->cancelFollow();
mPlayerFollowMouse = true;
// Make the player go to the mouse position
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 4577fd16..5861ca93 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -78,7 +78,6 @@ LocalPlayer::LocalPlayer(int id, int subtype):
mTargetTime(-1),
mLastTarget(-1),
mTarget(NULL),
- mPlayerFollowed(""),
mPickUpTarget(NULL),
mGoingToTarget(false), mKeepAttacking(false),
mLastAction(-1),
@@ -1126,7 +1125,6 @@ void LocalPlayer::changeAwayMode()
mAfkTime = 0;
if (mAwayMode)
{
- cancelFollow();
mAwayDialog = new OkDialog(_("Away"),
config.getValue("afkMessage", "I am away from keyboard"));
mAwayDialog->addActionListener(mAwayListener);
diff --git a/src/localplayer.h b/src/localplayer.h
index 6b50091a..b008a739 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -198,29 +198,6 @@ class LocalPlayer : public Being
void event(const std::string &channel, const Mana::Event &event);
/**
- * set a following player by right clicking.
- */
- void setFollow(std::string player) { mPlayerFollowed = player; }
-
- /**
- * setting the next destination of the following, in case of warp
- */
- void setNextDest(int x, int y) { mNextDestX = x; mNextDestY = y; }
-
- int getNextDestX() const { return mNextDestX; }
- int getNextDestY() const { return mNextDestY; }
-
- /**
- * Stop following a player.
- */
- void cancelFollow() { mPlayerFollowed = ""; }
-
- /**
- * Get the playername followed by the current player.
- */
- std::string getFollow() const { return mPlayerFollowed; }
-
- /**
* Tells the engine whether to check
* if the Player Name is to be displayed.
*/
@@ -247,11 +224,6 @@ class LocalPlayer : public Being
Being *mTarget;
- /** Follow system **/
- std::string mPlayerFollowed;
- int mNextDestX;
- int mNextDestY;
-
FloorItem *mPickUpTarget;
bool mGoingToTarget;
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 97967eb9..332ac548 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -113,7 +113,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
Uint16 status;
Being *srcBeing, *dstBeing;
int hairStyle, hairColor, flag;
- std::string player_followed;
switch (msg.getId())
{
@@ -269,16 +268,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (!dstBeing)
break;
- player_followed = player_node->getFollow();
-
- if (!player_followed.empty())
- {
- if (dstBeing->getName() == player_followed)
- {
- player_node->setDestination(player_node->getNextDestX(), player_node->getNextDestY());
- }
- }
-
// If this is player's current target, clear it.
if (dstBeing == player_node->getTarget())
player_node->stopAttack();
@@ -574,15 +563,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
dstBeing->setTileCoords(srcX, srcY);
dstBeing->setDestination(dstX, dstY);
- player_followed = player_node->getFollow();
- if (!player_followed.empty())
- {
- if (dstBeing->getName() == player_followed)
- {
- player_node->setNextDest(dstX, dstY);
- player_node->setDestination(srcX, srcY);
- }
- }
}
else
{