summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-26 16:36:05 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-26 16:36:05 +0000
commit00d7badb647b4293c444c0374985b7f1ea8a1ed1 (patch)
tree1e8ef25719f0954388a9c50bcf1e360f37540563 /src
parentef4486580fc7b8293555fcabc398ed0c2b90d78e (diff)
downloadmana-client-00d7badb647b4293c444c0374985b7f1ea8a1ed1.tar.gz
mana-client-00d7badb647b4293c444c0374985b7f1ea8a1ed1.tar.bz2
mana-client-00d7badb647b4293c444c0374985b7f1ea8a1ed1.tar.xz
mana-client-00d7badb647b4293c444c0374985b7f1ea8a1ed1.zip
Fixed player sprite not showing up.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp2
-rw-r--r--src/being.h2
-rw-r--r--src/net/charserverhandler.cpp2
-rw-r--r--src/player.cpp9
4 files changed, 8 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 70e3eb8e..87332c7a 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -46,7 +46,6 @@ PATH_NODE::PATH_NODE(Uint16 iX, Uint16 iY):
}
Being::Being(Uint32 id, Uint16 job, Map *map):
- mSex(2),
mJob(job),
mX(0), mY(0), mDirection(DOWN),
mAction(0),
@@ -55,6 +54,7 @@ Being::Being(Uint32 id, Uint16 job, Map *map):
mAttackSpeed(350),
mEquipment(new Equipment()),
mId(id),
+ mSex(2),
mWeapon(0),
mWalkSpeed(150),
mMap(NULL),
diff --git a/src/being.h b/src/being.h
index 496f183d..b99f85a3 100644
--- a/src/being.h
+++ b/src/being.h
@@ -99,7 +99,6 @@ class Being : public Sprite
static const char RIGHT = 8;
std::string mName; /**< Name of character */
- Uint8 mSex; /**< Character's gender */
Uint16 mJob; /**< Job (player job, npc, monster, ) */
Uint16 mX, mY; /**< Tile coordinates */
Uint8 mDirection; /**< Facing direction */
@@ -357,6 +356,7 @@ class Being : public Sprite
getSpriteDirection() const;
Uint32 mId; /**< Unique sprite id */
+ Uint8 mSex; /**< Character's gender */
Uint16 mWeapon; /**< Weapon picture id */
Uint16 mWalkSpeed; /**< Walking speed */
Map *mMap; /**< Map on which this being resides */
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index 5a2be683..1eea29b8 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -198,7 +198,7 @@ CharServerHandler::readPlayerData(MessageIn &msg, int &slot)
LocalPlayer *tempPlayer = new LocalPlayer(mLoginData->account_ID, 0, NULL);
slot = msg.readByte(); // character slot
tempPlayer->mName = msg.readString();
- tempPlayer->mSex = msg.readByte();
+ tempPlayer->setSex(msg.readByte());
tempPlayer->setHairStyle(msg.readByte());
tempPlayer->setHairColor(msg.readByte());
tempPlayer->mLevel = msg.readByte();
diff --git a/src/player.cpp b/src/player.cpp
index 3f4abebb..46d3b938 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -35,10 +35,11 @@
Player::Player(Uint32 id, Uint16 job, Map *map):
Being(id, job, map)
{
- // Load the weapon sprite.
- // When there are more different weapons this should be moved to the
- // setWeapon Method.
- mSprites[WEAPON_SPRITE] = new AnimatedSprite("graphics/sprites/weapons.xml", 0);
+ /* Load the weapon sprite. When there are more different weapons this
+ * should be moved to the setWeapon Method.
+ */
+ mSprites[WEAPON_SPRITE] =
+ new AnimatedSprite("graphics/sprites/weapons.xml", 0);
}
void