From 50335c6b1470c45753d720cebdf4af830ba7a46c Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Fri, 16 Jan 2009 08:36:33 -0700 Subject: 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 --- src/being.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/being.cpp') 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); } -- cgit v1.2.3-70-g09d2