summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-10 14:39:16 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-10 14:39:16 +0000
commit2136d196ef0e1dbb6d085c163443d83ec0766610 (patch)
tree5dd19a7f0b782f7e566cc6460caf6a5807ce3311 /src/gui/playerbox.cpp
parentd7e809c18ce55830fdc87eba29f30a6dfc4f222d (diff)
downloadmana-client-2136d196ef0e1dbb6d085c163443d83ec0766610.tar.gz
mana-client-2136d196ef0e1dbb6d085c163443d83ec0766610.tar.bz2
mana-client-2136d196ef0e1dbb6d085c163443d83ec0766610.tar.xz
mana-client-2136d196ef0e1dbb6d085c163443d83ec0766610.zip
Fixed PlayerBox to cope with no hair as well, and fixed using Makefile.cvs a
bit, to generate the configure.
Diffstat (limited to 'src/gui/playerbox.cpp')
-rw-r--r--src/gui/playerbox.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index 926b8b08..1abeaaa2 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -61,9 +61,13 @@ void PlayerBox::draw(gcn::Graphics *graphics)
playerset->spriteset[0]->draw(screen, x - 25, y - 25);
// Draw his hair
- int hf = hairColor + 40 * (hairStyle);
- if (hf >= 0 && hf < (int)hairset->spriteset.size()) {
- hairset->spriteset[hf]->draw(screen, x + 37, y + 5);
+ if (hairColor >= 0 && hairStyle >= 0 &&
+ hairColor < 10 && hairStyle < 4)
+ {
+ int hf = hairColor + 40 * (hairStyle);
+ if (hf >= 0 && hf < (int)hairset->spriteset.size()) {
+ hairset->spriteset[hf]->draw(screen, x + 37, y + 5);
+ }
}
}
}