diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/being.cpp | 2 | ||||
-rw-r--r-- | src/being.h | 2 | ||||
-rw-r--r-- | src/net/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/player.cpp | 9 |
5 files changed, 10 insertions, 7 deletions
@@ -6,6 +6,8 @@ data/graphics/sprites/Makefile.am: Got rid of numerous additions and substractions to the hair style and color. Hair style 0 was added and defined as being bald (so bald is no longer a hardcoded style). + * src/player.cpp, src/being.cpp, src/net/charserverhandler.cpp, + src/being.h: Fixed player sprite not showing up. 2006-08-26 Guillaume Melquiond <guillaume.melquiond@gmail.com> 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 |