summaryrefslogtreecommitdiff
path: root/src/resources/map/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-31 22:53:42 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-31 22:53:42 +0300
commit896d41e4b073046c59933ea8829474bd82b9c506 (patch)
tree737bbfa3381f9d0ddd8629faf29dd6dce0ca4be3 /src/resources/map/map.cpp
parent1962d62c1e209af7d61e85a4ed3675f0a16e5924 (diff)
downloadmv-896d41e4b073046c59933ea8829474bd82b9c506.tar.gz
mv-896d41e4b073046c59933ea8829474bd82b9c506.tar.bz2
mv-896d41e4b073046c59933ea8829474bd82b9c506.tar.xz
mv-896d41e4b073046c59933ea8829474bd82b9c506.zip
Improve special layers draw speed in same way like fringe layer.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r--src/resources/map/map.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index 759951bcf..49cb43810 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -1275,7 +1275,10 @@ void Map::addPortalTile(const std::string &restrict name,
const int x, const int y) restrict2
{
if (mSpecialLayer)
+ {
mSpecialLayer->setTile(x, y, new MapItem(type, name, x, y));
+ mSpecialLayer->updateCache();
+ }
mMapPortals.push_back(new MapItem(type, name, x, y));
}
@@ -1296,6 +1299,7 @@ void Map::updatePortalTile(const std::string &restrict name,
{
item = new MapItem(type, name, x, y);
mSpecialLayer->setTile(x, y, item);
+ mSpecialLayer->updateCache();
}
}
else if (addNew)