summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-09 23:24:25 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-09 23:24:25 +0300
commit7c42da72cde5a43dfd3894da44935da223d59436 (patch)
tree7ddb76ca90e6fa91ad51b750b14ccc54201020d1 /src
parent2381f6e964b228b30b735b7452d2234a4de9874f (diff)
downloadplus-7c42da72cde5a43dfd3894da44935da223d59436.tar.gz
plus-7c42da72cde5a43dfd3894da44935da223d59436.tar.bz2
plus-7c42da72cde5a43dfd3894da44935da223d59436.tar.xz
plus-7c42da72cde5a43dfd3894da44935da223d59436.zip
Add option to enable/disable reorder sprites feature.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp5
-rw-r--r--src/being.h1
-rw-r--r--src/defaults.cpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 47e1f03fc..cd616fc67 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -196,6 +196,7 @@ bool Being::mShowOwnHP = false;
bool Being::mShowGender = false;
bool Being::mShowLevel = false;
bool Being::mShowPlayersStatus = false;
+bool Being::mEnableReorderSprites = true;
std::list<BeingCacheEntry*> beingInfoCache;
@@ -1750,6 +1751,7 @@ void Being::reReadConfig()
mShowGender = config.getBoolValue("showgender");
mShowLevel = config.getBoolValue("showlevel");
mShowPlayersStatus = config.getBoolValue("showPlayersStatus");
+ mEnableReorderSprites = config.getBoolValue("enableReorderSprites");
mUpdateConfigTime = cur_time;
}
@@ -2073,6 +2075,9 @@ void Being::resetCounters()
void Being::recalcSpritesOrder()
{
+ if (!mEnableReorderSprites)
+ return;
+
// logger->log("recalcSpritesOrder");
unsigned sz = static_cast<unsigned>(size());
if (sz < 1)
diff --git a/src/being.h b/src/being.h
index 092e324e4..76c968451 100644
--- a/src/being.h
+++ b/src/being.h
@@ -873,6 +873,7 @@ class Being : public ActorSprite, public ConfigListener
static bool mShowGender;
static bool mShowLevel;
static bool mShowPlayersStatus;
+ static bool mEnableReorderSprites;
unsigned int mMoveTime;
unsigned int mAttackTime;
diff --git a/src/defaults.cpp b/src/defaults.cpp
index f779d4111..3824aafc9 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -213,6 +213,7 @@ DefaultsData* getConfigDefaults()
AddDEF(configData, "enableAlphaFix", false);
AddDEF(configData, "disableAdvBeingCaching", false);
AddDEF(configData, "disableBeingCaching", false);
+ AddDEF(configData, "enableReorderSprites", true);
return configData;
}