summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-02-22 19:58:29 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-05 17:28:29 +0100
commit615b1bc6080a3418b18fd4ab93b4212470709731 (patch)
treea82805bc56042899bd19620d667d890baefd7413 /src/being.cpp
parent12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51 (diff)
downloadmana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.gz
mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.bz2
mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.xz
mana-615b1bc6080a3418b18fd4ab93b4212470709731.zip
Handling gender with an enum everywhere.
(cherry picked from mainline commit d3adc61aa4b4924f82d8cbc23bea26da7257da97) Conflicts: src/net/beinghandler.cpp src/net/charserverhandler.cpp src/player.cpp src/player.h
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index f9c6296c..c04aeaa9 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -70,7 +70,7 @@ Being::Being(int id, int job, Map *map):
mMap(NULL),
mEquippedWeapon(NULL),
mHairStyle(1), mHairColor(0),
- mGender(2),
+ mGender(GENDER_UNSPECIFIED),
mSpeechTime(0),
mPx(0), mPy(0),
mStunMode(0),
@@ -669,9 +669,10 @@ static void initializeHair()
if (hairInitialized)
return;
- // Hairstyles are encoded as negative numbers. Count how far negative we can go.
+ // Hairstyles are encoded as negative numbers. Count how far negative we
+ // can go.
int hairstylesCtr = -1;
- while (ItemDB::get(hairstylesCtr).getSprite(0) != "error.xml")
+ while (ItemDB::get(hairstylesCtr).getSprite(GENDER_MALE) != "error.xml")
--hairstylesCtr;
hairStylesNr = -hairstylesCtr; // done.