summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2011-01-24 14:49:58 -0600
committerDavid Athay <ko2fan@gmail.com>2011-01-24 14:49:58 -0600
commit0c4cc6b924d953459198aaae4710296ffb47bfa4 (patch)
tree3ad7c841ee38b0c0980ffe3552c9e6a9bad9c613
parent760184661da4b96cc390ceb161646c8a83712acf (diff)
downloadmana-0c4cc6b924d953459198aaae4710296ffb47bfa4.tar.gz
mana-0c4cc6b924d953459198aaae4710296ffb47bfa4.tar.bz2
mana-0c4cc6b924d953459198aaae4710296ffb47bfa4.tar.xz
mana-0c4cc6b924d953459198aaae4710296ffb47bfa4.zip
Revert "Fixing pick-up with joystick"
This reverts commit 760184661da4b96cc390ceb161646c8a83712acf.
-rw-r--r--src/game.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 512b8b5f..cd36dcdd 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -779,6 +779,9 @@ void Game::handleInput()
return;
}
+ const Vector &pos = player_node->getPosition();
+ const Uint16 x = (int) pos.x / 32;
+ const Uint16 y = (int) pos.y / 32;
unsigned char direction = 0;
// Translate pressed keys to movement and direction
@@ -896,9 +899,6 @@ void Game::handleInput()
{
if (joystick->buttonPressed(1))
{
- const int x = player_node->getTileX();
- const int y = player_node->getTileY();
-
FloorItem *item = floorItemManager->findByCoordinates(x, y);
if (item)