diff options
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp index 66273710..f14fd64e 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -762,14 +762,15 @@ std::string Being::getHairColor(int index) void Being::load() { - // Hairstyles are encoded as negative numbers. Count how far negative + // Hairstyles are encoded as negative numbers. Count how far negative // we can go. - int hairstyles = -1; - while (ItemDB::get(hairstyles).getSprite(GENDER_MALE) != "error.xml") + int hairstyles = 1; + + while (ItemDB::get(-hairstyles).getSprite(GENDER_MALE) != "error.xml") { - hairstyles--; + hairstyles++; } - mNumberOfHairstyles = -hairstyles; + mNumberOfHairstyles = hairstyles; XML::Document doc(HAIR_FILE); xmlNodePtr root = doc.rootNode(); |