summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2006-12-27 20:39:21 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2006-12-27 20:39:21 +0000
commitb2ef30efb59c8aa4df3bbaab376d46c583a40d98 (patch)
treebfa5f4b4dbb937b4413e79427bf1bbab8522dbdb /src/gui
parent8da32105732949b4b0273c718d118bcfae70a1c9 (diff)
downloadmana-client-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.tar.gz
mana-client-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.tar.bz2
mana-client-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.tar.xz
mana-client-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.zip
Client-sided implementation of attacks
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popupmenu.cpp8
-rw-r--r--src/gui/viewport.cpp23
2 files changed, 1 insertions, 30 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index c2959e1d..c7c77ef4 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -136,14 +136,6 @@ void PopupMenu::handleLink(const std::string& link)
tradePartnerName = mBeing->getName();
}
- // Attack action
- else if (link == "attack" &&
- mBeing != NULL &&
- mBeing->getType() == Being::PLAYER)
- {
- player_node->attack(mBeing, true);
- }
-
/*
// Follow Player action
else if (link == "follow")
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index d0525a2f..f26d8d70 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -291,29 +291,9 @@ Viewport::mousePress(int mx, int my, int button)
Being *being;
FloorItem *item;
- // Interact with some being
- if ((being = beingManager->findBeing(tilex, tiley)))
- {
- switch (being->getType())
- {
- case Being::NPC:
- dynamic_cast<NPC*>(being)->talk();
- break;
-
- case Being::MONSTER:
- case Being::PLAYER:
- if (being->mAction == Being::DEAD)
- break;
- player_node->attack(being, true);
- break;
-
- default:
- break;
- }
- }
// Pick up some item
- else if ((item = floorItemManager->findByCoordinates(tilex, tiley)))
+ if ((item = floorItemManager->findByCoordinates(tilex, tiley)))
{
player_node->pickUp(item);
}
@@ -325,7 +305,6 @@ Viewport::mousePress(int mx, int my, int button)
if (!(keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]))
{
player_node->setDestination(mx + mCameraX, my + mCameraY);
- player_node->stopAttack();
}
mPlayerFollowMouse = true;
}