diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-16 08:36:33 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-16 08:36:33 -0700 |
commit | 50335c6b1470c45753d720cebdf4af830ba7a46c (patch) | |
tree | b18dd0bbc7f11e70860a617e9db597fd243b3283 /src/being.cpp | |
parent | 29a65dd896255e6e173201dcc0d50bfc273afb61 (diff) | |
download | mana-client-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.gz mana-client-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.bz2 mana-client-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.xz mana-client-50335c6b1470c45753d720cebdf4af830ba7a46c.zip |
Made emotes load in only one location, as well as fixing the code on the
being so that the last emote draws (which got broken).
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp index 883344d8..98aaeec2 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -93,12 +93,9 @@ Being::Being(int id, int job, Map *map): { EmoteInfo info = EmoteDB::get(i); - if (info.sprites != EmoteDB::getUnknown().sprites) - { - std::string file = "graphics/sprites/" + info.sprites.front()->sprite; - int variant = info.sprites.front()->variant; - emotionSet.push_back(AnimatedSprite::load(file, variant)); - } + std::string file = "graphics/sprites/" + info.sprites.front()->sprite; + int variant = info.sprites.front()->variant; + emotionSet.push_back(AnimatedSprite::load(file, variant)); } // Hairstyles are encoded as negative numbers. Count how far negative we can go. @@ -456,7 +453,7 @@ void Being::drawEmotion(Graphics *graphics, int offsetX, int offsetY) const int py = mPy + offsetY - 60; const int emotionIndex = mEmotion - 1; - if (emotionIndex >= 0 && emotionIndex < EmoteDB::getLast()) + if (emotionIndex >= 0 && emotionIndex <= EmoteDB::getLast()) emotionSet[emotionIndex]->draw(graphics, px, py); } |