diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-27 00:06:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-27 00:06:50 +0300 |
commit | d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45 (patch) | |
tree | 3484dced58d9e26cf0c5918c83a7679c254778ac /src/being | |
parent | 3f30e64773e3387332beca6f86c22f5fb8840d4b (diff) | |
download | manaverse-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.tar.gz manaverse-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.tar.bz2 manaverse-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.tar.xz manaverse-d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45.zip |
fix possible crash after last changes in reoder logic.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 10 |
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]); } } |