summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-03-05 22:33:09 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-03-05 22:33:09 +0000
commit5f9bbd205fec7d66643861a5204c6cc7dec639ba (patch)
treead21b3432c3cafb10a9e4a7d32b600cebe74d92c /src/localplayer.cpp
parenta74208583e806fcfdc485428fb4f9e694e962455 (diff)
downloadmana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.tar.gz
mana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.tar.bz2
mana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.tar.xz
mana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.zip
Merged new_playerset branch into trunk.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 43cf0069..e10fd3d6 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -54,15 +54,20 @@ void LocalPlayer::logic()
{
switch (action) {
case WALK:
- mFrame = (get_elapsed_time(walk_time) * 4) / mWalkSpeed;
- if (mFrame >= 4) {
+ mFrame = (get_elapsed_time(walk_time) * 6) / mWalkSpeed;
+ if (mFrame >= 6) {
nextStep();
}
break;
case ATTACK:
- mFrame = (get_elapsed_time(walk_time) * 4) / aspd;
- if (mFrame >= 4) {
+ int frames = 4;
+ if (getWeapon() == 2)
+ {
+ frames = 5;
+ }
+ mFrame = (get_elapsed_time(walk_time) * frames) / aspd;
+ if (mFrame >= frames) {
nextStep();
attack();
}