summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-10 20:16:22 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-10 20:16:22 +0300
commit268e72f74c0cc7f52289b8d97091bb4ecf3f0561 (patch)
tree83e9f35a5856e804956964dca2b11005d9a47472
parent44e5d8bcb7fea443ca9ed3844454b11ac6e4dbed (diff)
downloadmanaverse-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.tar.gz
manaverse-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.tar.bz2
manaverse-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.tar.xz
manaverse-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.zip
Improve sprites update speed.
-rw-r--r--src/being/being.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index f28ea591b..566720b0c 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1920,6 +1920,10 @@ void Being::setSprite(const unsigned int slot, const int id,
if (slot >= mSpriteColorsIds.size())
mSpriteColorsIds.resize(slot + 1, 1);
+ // here probably need more complex condition
+ if (slot && mSpriteIDs[slot] == id)
+ return;
+
// id = 0 means unequip
if (id == 0)
{