diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-01-19 18:15:54 +0100 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-01-22 12:05:11 +0100 |
commit | 8a4b82e3ed75e426d44b69640f009e1e731c75c4 (patch) | |
tree | 4393fcd7681942561dc0ac988d4762682979328f /src/localplayer.cpp | |
parent | c4bdf324d7d464bc7fabbf88e1a6e66701c6e7cb (diff) | |
download | mana-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.cpp | 4 |
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 |