summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
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/viewport.cpp
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/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp23
1 files changed, 1 insertions, 22 deletions
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;
}