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.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 4e116889..15fbf68a 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -531,8 +531,12 @@ Tileset *MapReader::readTileset(xmlNodePtr node,
break;
}
}
- map->addAnimation(tileGID, new TileAnimation(ani));
- logger->log("Animation length: %d", ani->getLength());
+
+ if (ani->getLength() > 0)
+ {
+ map->addAnimation(tileGID, new TileAnimation(ani));
+ logger->log("Animation length: %d", ani->getLength());
+ }
}
}
}