diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-27 17:05:14 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-27 17:05:14 +0000 |
commit | 0007b8e9497eacb506c8bfad34aad5adff10ba5a (patch) | |
tree | 5c256dac8cd142a762a948ef6a481789e3fbdf2c /src/gui/char_select.cpp | |
parent | f3beda85b284e57caf6e5c685174bcb2e608d9ce (diff) | |
download | mana-0007b8e9497eacb506c8bfad34aad5adff10ba5a.tar.gz mana-0007b8e9497eacb506c8bfad34aad5adff10ba5a.tar.bz2 mana-0007b8e9497eacb506c8bfad34aad5adff10ba5a.tar.xz mana-0007b8e9497eacb506c8bfad34aad5adff10ba5a.zip |
De-hardcoded the number of hair styles.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r-- | src/gui/char_select.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index b83f98de..ca4d8608 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -261,7 +261,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network, printf("%d\n", numberOfHairColors); - mPlayer->setHairStyle(rand() % NR_HAIR_STYLES, rand() % numberOfHairColors); + mPlayer->setHairStyle(rand() % mPlayer->getNumOfHairstyles(), rand() % numberOfHairColors); mNameField = new TextField(""); mNameLabel = new gcn::Label("Name:"); @@ -352,7 +352,7 @@ CharCreateDialog::action(const gcn::ActionEvent &event) mPlayer->setHairStyle(mPlayer->getHairStyle() + 1, mPlayer->getHairColor()); } else if (event.getId() == "prevstyle") { - mPlayer->setHairStyle(mPlayer->getHairStyle() + NR_HAIR_STYLES - 1, mPlayer->getHairColor()); + mPlayer->setHairStyle(mPlayer->getHairStyle() + mPlayer->getNumOfHairstyles() - 1, mPlayer->getHairColor()); } } |