summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-01-19 18:15:54 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-01-22 12:05:11 +0100
commit8a4b82e3ed75e426d44b69640f009e1e731c75c4 (patch)
tree4393fcd7681942561dc0ac988d4762682979328f /src/localplayer.cpp
parentc4bdf324d7d464bc7fabbf88e1a6e66701c6e7cb (diff)
downloadmana-8a4b82e3ed75e426d44b69640f009e1e731c75c4.tar.gz
mana-8a4b82e3ed75e426d44b69640f009e1e731c75c4.tar.bz2
mana-8a4b82e3ed75e426d44b69640f009e1e731c75c4.tar.xz
mana-8a4b82e3ed75e426d44b69640f009e1e731c75c4.zip
Prevented looking at item when picking up while moving
+ Fixes from Bjorns review. Reviewed-by: Bjorn.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index a0350ce8..612fdd82 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -605,6 +605,10 @@ void LocalPlayer::pickUp(FloorItem *item)
if (dx * dx + dy * dy < 4)
{
Net::getPlayerHandler()->pickUp(item);
+ // We found it, so set the player direction to it
+ // if the player does not move
+ if (getDestination() == getPosition())
+ lookAt(item->getPosition());
mPickUpTarget = NULL;
}
else