diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-04 02:20:38 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-04 02:20:38 +0000 |
commit | 4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac (patch) | |
tree | 0b18ed6970f8fdd6750459e6f9032e444d253580 /src/localplayer.cpp | |
parent | e160ba567bf3d2ae915e67c12c13e213c1a32a62 (diff) | |
download | mana-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.tar.gz mana-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.tar.bz2 mana-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.tar.xz mana-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.zip |
Merged 0.0 changes from revision 2898 to 2988 to trunk.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index ba7b6117..8076c538 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -166,11 +166,6 @@ void LocalPlayer::pickUp(FloorItem *item) void LocalPlayer::walk(unsigned char dir) { - if (mWalkingDir != dir) - { - mWalkingDir = dir; - } - if (!mMap || !dir) return; @@ -237,6 +232,20 @@ void LocalPlayer::setDestination(Uint16 x, Uint16 y) Being::setDestination(x, y); } +void LocalPlayer::setWalkingDir(int dir) +{ + if (mWalkingDir != dir) + { + mWalkingDir = dir; + } + + // If we're not already walking, start walking. + if (mAction != WALK && dir) + { + walk(dir); + } +} + void LocalPlayer::raiseAttribute(Attribute attr) { // XXX Convert for new server |