diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-22 19:58:29 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-05 17:28:29 +0100 |
commit | 615b1bc6080a3418b18fd4ab93b4212470709731 (patch) | |
tree | a82805bc56042899bd19620d667d890baefd7413 /src/player.cpp | |
parent | 12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51 (diff) | |
download | mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.gz mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.bz2 mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.xz mana-615b1bc6080a3418b18fd4ab93b4212470709731.zip |
Handling gender with an enum everywhere.
(cherry picked from mainline commit d3adc61aa4b4924f82d8cbc23bea26da7257da97)
Conflicts:
src/net/beinghandler.cpp
src/net/charserverhandler.cpp
src/player.cpp
src/player.h
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/player.cpp b/src/player.cpp index f43e54d5..f81c039c 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -105,25 +105,17 @@ Player::flash(int time) } } -void Player::setGender(int gender) +void Player::setGender(Gender gender) { - // Players can only be male or female - if (gender > 1) - { - logger->log("Warning: unsupported gender %i, assuming male.", gender); - gender = 0; - } - - if (gender != mGender) { Being::setGender(gender); - setSprite(Being::BASE_SPRITE, -100); /* Human base sprite. When implementing - * different races remove this line - * and set the base sprite when setting - * the race of the player character. - */ + /* Human base sprite. When implementing different races remove this + * line and set the base sprite when setting the race of the player + * character. + */ + setSprite(Being::BASE_SPRITE, -100); // Reload all subsprites for (int i = 1; i < VECTOREND_SPRITE; i++) |