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/gui/emotecontainer.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gui/emotecontainer.cpp') diff --git a/src/gui/emotecontainer.cpp b/src/gui/emotecontainer.cpp index 691211ca..cba744dd 100644 --- a/src/gui/emotecontainer.cpp +++ b/src/gui/emotecontainer.cpp @@ -28,6 +28,7 @@ #include "../animatedsprite.h" #include "../configuration.h" #include "../graphics.h" +#include "../localplayer.h" #include "../log.h" #include "../resources/emotedb.h" @@ -52,14 +53,7 @@ EmoteContainer::EmoteContainer(): // Setup emote sprites for (int i = 0; i <= EmoteDB::getLast(); i++) { - 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; - mEmoteImg.push_back(AnimatedSprite::load(file, variant)); - } + mEmoteImg.push_back(player_node->getEmote(i)); } mSelImg = resman->getImage("graphics/gui/selection.png"); -- cgit v1.2.3-70-g09d2