summaryrefslogtreecommitdiff
path: root/src/being.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/being.cpp
parent5cc5c903df7b535c6bf27987b89a405812d89735 (diff)
downloadmana-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.gz
mana-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.bz2
mana-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.xz
mana-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/being.cpp')
-rw-r--r--src/being.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 7755d4e5..70e3eb8e 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -104,21 +104,13 @@ Being::setPath(const Path &path)
void
Being::setHairColor(Uint16 color)
{
- mHairColor = color;
- if (mHairColor < 1 || mHairColor > NR_HAIR_COLORS + 1)
- {
- mHairColor = 1;
- }
+ mHairColor = (color < NR_HAIR_COLORS) ? color : 0;
}
void
Being::setHairStyle(Uint16 style)
{
- mHairStyle = style;
- if (mHairStyle < 1 || mHairStyle > NR_HAIR_STYLES)
- {
- mHairStyle = 1;
- }
+ mHairStyle = (style < NR_HAIR_STYLES) ? style : 0;
}
void