summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-10-21 23:55:59 +0200
committerBertram <bertram@cegetel.net>2009-10-21 23:55:59 +0200
commitc36ab53b35e336e21fce5943d7d609ea02f8cea9 (patch)
treec1daf14c379704f0591bddd56c6208585a778ce9 /src/being.cpp
parentf5f351c570708f4ca923eeecee483874e673a277 (diff)
downloadmana-client-c36ab53b35e336e21fce5943d7d609ea02f8cea9.tar.gz
mana-client-c36ab53b35e336e21fce5943d7d609ea02f8cea9.tar.bz2
mana-client-c36ab53b35e336e21fce5943d7d609ea02f8cea9.tar.xz
mana-client-c36ab53b35e336e21fce5943d7d609ea02f8cea9.zip
Commencing the keyboard walking fine-tune.
Also, fixed sit to stand action change.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/being.cpp b/src/being.cpp
index c13b52f7..d133225f 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -192,6 +192,12 @@ void Being::setDestination(int dstX, int dstY)
it++;
}
+ // Remove the last path node, as it's more clever to go to mDest instead.
+ // It also permit to avoid zigzag at the end of the path,
+ // especially with mouse.
+ thisPath.pop_back();
+ thisPath.push_back(Position(mDest.x, mDest.y));
+
setPath(thisPath);
}
#endif // TMWSERV_SUPPORT
@@ -534,7 +540,7 @@ void Being::logic()
const float nominalLength = dir.length();
// When we've not reached our destination, move to it.
- if (nominalLength > 0.0f && mWalkSpeed > 0.0f)
+ if (nominalLength > 1.0f && mWalkSpeed > 0.0f)
{
// The private mWalkSpeed member is the speed in tiles per second.