diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-10 20:16:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-10 20:16:22 +0300 |
commit | 268e72f74c0cc7f52289b8d97091bb4ecf3f0561 (patch) | |
tree | 83e9f35a5856e804956964dca2b11005d9a47472 | |
parent | 44e5d8bcb7fea443ca9ed3844454b11ac6e4dbed (diff) | |
download | mv-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.tar.gz mv-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.tar.bz2 mv-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.tar.xz mv-268e72f74c0cc7f52289b8d97091bb4ecf3f0561.zip |
Improve sprites update speed.
-rw-r--r-- | src/being/being.cpp | 4 |
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) { |