diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-16 20:35:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-16 20:35:32 +0300 |
commit | 2ff3df08fa993d1bf1f00f47f7cbad7b60ce3ce3 (patch) | |
tree | 18f29487d5596859679302c4cd7cc764e20708a4 | |
parent | e1e32075c34dc61f6abbd7b9cd1aed250854d6de (diff) | |
download | plus-2ff3df08fa993d1bf1f00f47f7cbad7b60ce3ce3.tar.gz plus-2ff3df08fa993d1bf1f00f47f7cbad7b60ce3ce3.tar.bz2 plus-2ff3df08fa993d1bf1f00f47f7cbad7b60ce3ce3.tar.xz plus-2ff3df08fa993d1bf1f00f47f7cbad7b60ce3ce3.zip |
In features.xml add option for fix dead animations.
New option: fixDeadAnimation
Default value: true
-rw-r--r-- | src/client.cpp | 1 | ||||
-rw-r--r-- | src/defaults.cpp | 1 | ||||
-rw-r--r-- | src/resources/spritedef.cpp | 6 | ||||
-rw-r--r-- | src/settings.h | 4 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/client.cpp b/src/client.cpp index 1fef92bd2..f5268f6c8 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1703,6 +1703,7 @@ void Client::initFeatures() { features.init(paths.getStringValue("featuresFile"), true); features.setDefaultValues(getFeaturesDefaults()); + settings.fixDeadAnimation = features.getBoolValue("fixDeadAnimation"); } void Client::initTradeFilter() diff --git a/src/defaults.cpp b/src/defaults.cpp index 6e095a629..e1762d91f 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -573,6 +573,7 @@ DefaultsData* getFeaturesDefaults() DefaultsData *const configData = new DefaultsData; AddDEF("languageTab", false); AddDEF("allowFollow", true); + AddDEF("fixDeadAnimation", true); return configData; } diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 74ac376b5..7b89af145 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -22,7 +22,9 @@ #include "resources/spritedef.h" +#include "configuration.h" #include "logger.h" +#include "settings.h" #include "resources/map/mapconsts.h" @@ -34,8 +36,6 @@ #include "resources/spriteaction.h" #include "resources/spritereference.h" -#include "configuration.h" - #include "debug.h" SpriteReference *SpriteReference::Empty = nullptr; @@ -106,7 +106,7 @@ SpriteDef *SpriteDef::load(const std::string &animationFile, def->mProcessedFiles.insert(animationFile); def->loadSprite(rootNode, variant, palettes); def->substituteActions(); - if (serverVersion < 1) + if (settings.fixDeadAnimation) def->fixDeadAction(); if (prot) { diff --git a/src/settings.h b/src/settings.h index ab18c5ebe..1362672aa 100644 --- a/src/settings.h +++ b/src/settings.h @@ -73,7 +73,8 @@ class Settings final mouseFocused(true), disableGameModifiers(false), awayMode(false), - pseudoAwayMode(false) + pseudoAwayMode(false), + fixDeadAnimation(true) { } std::string updateHost; @@ -116,6 +117,7 @@ class Settings final bool disableGameModifiers; bool awayMode; bool pseudoAwayMode; + bool fixDeadAnimation; }; extern Settings settings; |