diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-24 10:36:36 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-24 10:36:36 +0000 |
commit | 36aee3039d377eba9cd73f539d317946e1b76dff (patch) | |
tree | 8c4ea0bf8d43efafe5f42ac6214245d577e193b7 /src | |
parent | 4789ebb11407eb9402c385f3cc6fa242d91214c2 (diff) | |
download | mana-36aee3039d377eba9cd73f539d317946e1b76dff.tar.gz mana-36aee3039d377eba9cd73f539d317946e1b76dff.tar.bz2 mana-36aee3039d377eba9cd73f539d317946e1b76dff.tar.xz mana-36aee3039d377eba9cd73f539d317946e1b76dff.zip |
Removed unused code, fixed "change direction when not walking" bug, updated project files.
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 15 | ||||
-rw-r--r-- | src/being.h | 6 | ||||
-rw-r--r-- | src/localplayer.cpp | 6 |
3 files changed, 6 insertions, 21 deletions
diff --git a/src/being.cpp b/src/being.cpp index 437023d4..69057c09 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -125,21 +125,6 @@ Being::setHairStyle(Uint16 style) } void -Being::setHair(Uint16 style, Uint16 color) -{ - mHairStyle = style; - if (mHairStyle < 1 || mHairStyle > NR_HAIR_STYLES) - { - mHairStyle = 1; - } - mHairColor = color; - if (mHairColor < 1 || mHairColor > NR_HAIR_COLORS + 1) - { - mHairColor = 1; - } -} - -void Being::setVisibleEquipment(Uint8 slot, Uint8 id) { } diff --git a/src/being.h b/src/being.h index 6d2bada6..41c9103d 100644 --- a/src/being.h +++ b/src/being.h @@ -186,12 +186,6 @@ class Being : public Sprite getHairStyle() const { return mHairStyle; } /** - * Sets the hair style and color for this being. - */ - virtual void - setHair(Uint16 style, Uint16 color); - - /** * Sets visible equipments for this being. */ virtual void diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 339435a5..8b601326 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -210,6 +210,9 @@ void LocalPlayer::walk(unsigned char dir) { // Update the player direction to where he wants to walk // Warning: Not communicated to the server yet + + // If the being can't move, just change direction + mDirection = dir; setDirection(dir); } } @@ -344,7 +347,10 @@ void LocalPlayer::attack(Being *target, bool keep) if (abs(dist_y) >= abs(dist_x)) { if (dist_y > 0) + { setDirection(DOWN); + printf("DOWN\n"); + } else setDirection(UP); } |