summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-26 16:01:24 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-26 16:01:24 +0000
commitef4486580fc7b8293555fcabc398ed0c2b90d78e (patch)
tree41312f2ab68ceaa95ca0cc235f6b612c790bb90e /src/gui/playerbox.cpp
parent5cc5c903df7b535c6bf27987b89a405812d89735 (diff)
downloadmana-client-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.gz
mana-client-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.bz2
mana-client-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.xz
mana-client-ef4486580fc7b8293555fcabc398ed0c2b90d78e.zip
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).
Diffstat (limited to 'src/gui/playerbox.cpp')
-rw-r--r--src/gui/playerbox.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index d8faff99..ba97d54c 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -94,12 +94,13 @@ void PlayerBox::draw(gcn::Graphics *graphics)
playerset[mSex]->get(0), 23, 12);
// Draw his hair
- if (mHairColor < NR_HAIR_COLORS && mHairStyle < NR_HAIR_STYLES)
+ if (mHairStyle > 0 && mHairColor < NR_HAIR_COLORS &&
+ mHairStyle < NR_HAIR_STYLES)
{
int hf = 9 * mHairColor;
if (hf >= 0 && hf < (int)hairset[mHairStyle]->size()) {
dynamic_cast<Graphics*>(graphics)->drawImage(
- hairset[mHairStyle]->get(hf), 35, 7);
+ hairset[mHairStyle - 1]->get(hf), 35, 7);
}
}
}