From d111d37cbc3a3ab828c7bd8f9100fc6ed1fafe45 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 27 Nov 2013 00:06:50 +0300 Subject: fix possible crash after last changes in reoder logic. --- src/being/being.cpp | 10 ++++++++-- 1 file 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]); } } -- cgit v1.2.3-70-g09d2