summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-09-25 00:15:44 +0000
committerIra Rice <irarice@gmail.com>2008-09-25 00:15:44 +0000
commit489a429bea6739dfa25503b9329bd9e33bffb856 (patch)
tree8112f6fd988fdc0610329b6bc14ee3f9d5801092 /src/localplayer.cpp
parent2dc8eadff1e67bb70b1772ecc19c9e1e2e40a5b4 (diff)
downloadmana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.gz
mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.bz2
mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.xz
mana-489a429bea6739dfa25503b9329bd9e33bffb856.zip
Merged the Tametomo branch into trunk.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 554c52a6..66d37ddf 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -18,7 +18,7 @@
* along with The Mana World; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: localplayer.cpp 4347 2008-06-12 09:06:01Z b_lindeijer $
+ * $Id$
*/
#include "localplayer.h"
@@ -48,8 +48,8 @@ LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
mAttackRange(0),
mXp(0), mNetwork(0),
mTarget(NULL), mPickUpTarget(NULL),
- mTrading(false), mInStorage(false),
- mGoingToTarget(false), mLastAction(-1),
+ mTrading(false), mGoingToTarget(false),
+ mLastAction(-1),
mWalkingDir(0), mDestX(0), mDestY(0),
mInventory(new Inventory(INVENTORY_SIZE)),
mStorage(new Inventory(STORAGE_SIZE))
@@ -65,6 +65,18 @@ LocalPlayer::~LocalPlayer()
void LocalPlayer::logic()
{
switch (mAction) {
+ case STAND:
+ break;
+
+ case SIT:
+ break;
+
+ case DEAD:
+ break;
+
+ case HURT:
+ break;
+
case WALK:
mFrame = (get_elapsed_time(mWalkTime) * 6) / mWalkSpeed;
if (mFrame >= 6) {
@@ -144,6 +156,9 @@ void LocalPlayer::unequipItem(Item *item)
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_PLAYER_UNEQUIP);
outMsg.writeInt16(item->getInvIndex());
+
+ // Tidy equipment directly to avoid weapon still shown bug, for instance
+ mEquipment->removeEquipment(item);
}
void LocalPlayer::useItem(Item *item)
@@ -183,7 +198,6 @@ void LocalPlayer::pickUp(FloorItem *item)
void LocalPlayer::walk(unsigned char dir)
{
-
if (!mMap || !dir)
return;