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/gui/emotecontainer.cpp | |
parent | 29a65dd896255e6e173201dcc0d50bfc273afb61 (diff) | |
download | mana-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.gz mana-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.bz2 mana-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.xz mana-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/gui/emotecontainer.cpp')
-rw-r--r-- | src/gui/emotecontainer.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
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"); |