summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-09 18:49:05 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-09 18:49:05 +0300
commitb9d66c41246fef56e41f600b5523a5ff1a29a1c8 (patch)
tree3e6e546d393975b83ae951561cb6b05d920ef048 /src/resources/mapreader.cpp
parent8bed92098b94ebe14dfd9d622585fbfc150a8757 (diff)
downloadmanaverse-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.tar.gz
manaverse-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.tar.bz2
manaverse-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.tar.xz
manaverse-b9d66c41246fef56e41f600b5523a5ff1a29a1c8.zip
Improve map loading speed.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 25e9750de..d2bcde06d 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -370,7 +370,7 @@ Map *MapReader::readMap(xmlNodePtr node, const std::string &path)
}
map->initializeAmbientLayers();
-
+ map->clearIndexedTilesets();
return map;
}
@@ -424,6 +424,8 @@ void MapReader::readLayer(xmlNodePtr node, Map *map)
const bool isFringeLayer = (name.substr(0, 6) == "fringe");
const bool isCollisionLayer = (name.substr(0, 9) == "collision");
+ map->indexTilesets();
+
MapLayer *layer = 0;
if (!isCollisionLayer)