diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-28 23:04:08 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-28 23:04:08 +0000 |
commit | 391203d83ed7a72b54fb7d7c72dbe35db14f0ea9 (patch) | |
tree | a9a9e14bbbdde0b48c66b99038d505a42a51609b /src/player.cpp | |
parent | af61e1e7df91b97c3f7516e9eb2b37b621f069ad (diff) | |
download | mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.gz mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.bz2 mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.xz mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.zip |
Merged trunk development between revisions 2530 and 2618 to the 0.1.0 branch.
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/player.cpp b/src/player.cpp index b635397e..af9a3344 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -84,6 +84,7 @@ Player::setSex(Uint8 sex) } Being::setSex(sex); + resetAnimations(); } } @@ -99,6 +100,7 @@ Player::setHairColor(Uint16 color) newHairSprite->setDirection(getSpriteDirection()); mSprites[HAIR_SPRITE] = newHairSprite; + resetAnimations(); setAction(mAction); } @@ -118,6 +120,7 @@ Player::setHairStyle(Uint16 style) newHairSprite->setDirection(getSpriteDirection()); mSprites[HAIR_SPRITE] = newHairSprite; + resetAnimations(); setAction(mAction); } @@ -155,6 +158,7 @@ Player::setVisibleEquipment(Uint8 slot, Uint8 id) equipmentSprite->setDirection(getSpriteDirection()); mSprites[position] = equipmentSprite; + resetAnimations(); setAction(mAction); } @@ -162,4 +166,14 @@ Player::setVisibleEquipment(Uint8 slot, Uint8 id) Being::setVisibleEquipment(slot, id); } - +void +Player::resetAnimations() +{ + for (int i = 0; i < VECTOREND_SPRITE; i++) + { + if (mSprites[i] != NULL) + { + mSprites[i]->reset(); + } + } +} |