summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2012-03-01 22:03:01 +0100
committerReid <reidyaro@gmail.com>2012-03-01 22:03:01 +0100
commit490862919d79369112c75955a9c36ff8a081efd3 (patch)
tree6fe89466b9c53ba811f298174e6d787bbae71e09 /src/being.cpp
parentdff814619d63496acd3c4e8730b828b5d4d931fb (diff)
parentd873da3e8e57480016596f714845c1bc7e712e68 (diff)
downloadplus-490862919d79369112c75955a9c36ff8a081efd3.tar.gz
plus-490862919d79369112c75955a9c36ff8a081efd3.tar.bz2
plus-490862919d79369112c75955a9c36ff8a081efd3.tar.xz
plus-490862919d79369112c75955a9c36ff8a081efd3.zip
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index e1cb9b0ae..664eecd1d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -1380,8 +1380,10 @@ void Being::drawEmotion(Graphics *graphics, int offsetX, int offsetY)
if (emotionIndex >= 0 && emotionIndex <= EmoteDB::getLast())
{
- if (EmoteDB::getAnimation(emotionIndex))
+ if (EmoteDB::getAnimation(emotionIndex, true))
EmoteDB::getAnimation(emotionIndex)->draw(graphics, px, py);
+ else
+ mEmotion = 0;
}
}
@@ -2320,7 +2322,7 @@ void Being::recalcSpritesOrder()
int val = slotRemap.at(slot);
int id = 0;
- if ((int)mSpriteIDs.size() > val)
+ if (static_cast<int>(mSpriteIDs.size()) > val)
id = mSpriteIDs[val];
int idx = -1;
@@ -2525,7 +2527,6 @@ void Being::saveComment(const std::string &name,
void Being::setState(Uint8 state)
{
- mAdvanced = true;
bool shop = (state & FLAG_SHOP);
bool away = (state & FLAG_AWAY);
bool inactive = (state & FLAG_INACTIVE);
@@ -2548,6 +2549,7 @@ void Being::setEmote(Uint8 emotion, int emote_time)
if ((emotion & FLAG_SPECIAL) == FLAG_SPECIAL)
{
setState(emotion);
+ mAdvanced = true;
}
else
{