diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-08 18:04:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-08 18:04:00 +0300 |
commit | 4f96bf265375b7ca580f072f5a25c8b4097fb04a (patch) | |
tree | 65faa147a7e3015931ad25f714d9aab368d98a35 /src/resources/mapreader.cpp | |
parent | baca54daa08332ac447793e5a4eb50abe467cc9a (diff) | |
download | plus-4f96bf265375b7ca580f072f5a25c8b4097fb04a.tar.gz plus-4f96bf265375b7ca580f072f5a25c8b4097fb04a.tar.bz2 plus-4f96bf265375b7ca580f072f5a25c8b4097fb04a.tar.xz plus-4f96bf265375b7ca580f072f5a25c8b4097fb04a.zip |
Add option for disable / enable particles effect located in map file.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index cd5a1feb7..e6e0dc912 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -415,6 +415,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) const int tileOffsetY = XML::getProperty(childNode, "y", 0); const int offsetX = tileOffsetX * tilew; const int offsetY = tileOffsetY * tileh; + const bool showParticles = config.getBoolValue("mapparticleeffects"); for_each_xml_child_node(objectNode, childNode) { @@ -454,10 +455,18 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) continue; } - map->addParticleEffect(objName, - objX + offsetX, - objY + offsetY, - objW, objH); + if (showParticles) + { + map->addParticleEffect(objName, + objX + offsetX, + objY + offsetY, + objW, + objH); + } + else + { + logger->log("Ignore particle effect: " + objName); + } } else if (objType == "WARP") { |