summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index d697dc215..e8f1927b8 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -1196,10 +1196,10 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
haveAnimation = true;
const std::string name = XML::getProperty(
propertyNode, "name", "");
- const int value = XML::getProperty(
- propertyNode, "value", 0);
if (!name.empty())
{
+ const int value = XML::getProperty(
+ propertyNode, "value", 0);
tileProperties[name] = value;
logger->log("Tile Prop of %d \"%s\" = \"%d\"",
tileGID, name.c_str(), value);
@@ -1241,13 +1241,13 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
if (!xmlNameEqual(frameNode, "frame"))
continue;
- const int tileId = XML::getProperty(
- frameNode, "tileid", 0);
- const int duration = XML::getProperty(
- frameNode, "duration", 0) / 10;
-
if (set != nullptr)
{
+ const int tileId = XML::getProperty(
+ frameNode, "tileid", 0);
+ const int duration = XML::getProperty(
+ frameNode, "duration", 0) / 10;
+
ani->addFrame(set->get(tileId),
duration,
0, 0, 100);