diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2006-12-27 20:39:21 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2006-12-27 20:39:21 +0000 |
commit | b2ef30efb59c8aa4df3bbaab376d46c583a40d98 (patch) | |
tree | bfa5f4b4dbb937b4413e79427bf1bbab8522dbdb /src/gui/viewport.cpp | |
parent | 8da32105732949b4b0273c718d118bcfae70a1c9 (diff) | |
download | mana-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.tar.gz mana-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.tar.bz2 mana-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.tar.xz mana-b2ef30efb59c8aa4df3bbaab376d46c583a40d98.zip |
Client-sided implementation of attacks
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 23 |
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; } |