From 896d41e4b073046c59933ea8829474bd82b9c506 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 31 Dec 2016 22:53:42 +0300 Subject: Improve special layers draw speed in same way like fringe layer. --- src/resources/map/map.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/resources/map/map.cpp') 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) -- cgit v1.2.3-70-g09d2