summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-27 00:06:50 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-27 00:06:50 +0300
commitd111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45 (patch)
tree3484dced58d9e26cf0c5918c83a7679c254778ac /src/being/being.cpp
parent3f30e64773e3387332beca6f86c22f5fb8840d4b (diff)
downloadplus-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.tar.gz
plus-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.tar.bz2
plus-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.tar.xz
plus-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.zip
fix possible crash after last changes in reoder logic.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 8d0cc7df1..be8db4058 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2722,19 +2722,25 @@ void Being::recalcSpritesOrder()
mSpriteRemap[slot] = slotRemap[slot];
if (mSpriteHide[slot] == 0)
{
- const int id = mSpriteIDs[slot];
if (oldHide[slot] != 0 && oldHide[slot] != 1)
{
+ const int id = mSpriteIDs[slot];
if (!id)
continue;
updatedSprite[slot] = true;
setSprite(slot, id, mSpriteColors[slot], 1, false, true);
}
+ }
+ }
+ for (unsigned slot = 0; slot < spriteIdSize; slot ++)
+ {
+ if (mSpriteHide[slot] == 0)
+ {
+ const int id = mSpriteIDs[slot];
if (updatedSprite[slot] == false && mSpriteDraw[slot] != id)
setSprite(slot, id, mSpriteColors[slot], 1, false, true);
}
-// logger->log("slot %d = %d", slot, mSpriteRemap[slot]);
}
}