summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-02-01 21:12:41 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-02-01 21:12:41 +0100
commit852de0424f7226dfd61d2779c1ea6413ac85d584 (patch)
treee902d1e91d760273cb1b1fba4c51cf3232ed6194 /src/game.cpp
parentf19b3786f3f000a84c8080594e398686e0298ca4 (diff)
parentbcd1d9aff41b5c152cafade7532242c94ac1f710 (diff)
downloadmana-852de0424f7226dfd61d2779c1ea6413ac85d584.tar.gz
mana-852de0424f7226dfd61d2779c1ea6413ac85d584.tar.bz2
mana-852de0424f7226dfd61d2779c1ea6413ac85d584.tar.xz
mana-852de0424f7226dfd61d2779c1ea6413ac85d584.zip
Merge branch '0.5'
Conflicts: po/de.po src/game.cpp src/resources/wallpaper.cpp
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 4da19bf8..fd453434 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -795,9 +795,6 @@ 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
@@ -915,6 +912,9 @@ void Game::handleInput()
{
if (joystick->buttonPressed(1))
{
+ const int x = player_node->getTileX();
+ const int y = player_node->getTileY();
+
FloorItem *item = actorSpriteManager->findItem(x, y);
if (item)