MapTile.unlock improvements #539

This commit is contained in:
Emux 2018-05-08 15:16:11 +03:00
parent b9f989a454
commit 7ca09f3acb
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3

View File

@ -240,11 +240,17 @@ public class MapTile extends Tile {
if (--locked > 0)
return;
if ((proxy & PROXY_PARENT) != 0)
node.parent.item.refs--;
if ((proxy & PROXY_PARENT) != 0) {
MapTile p = node.parent();
if (p != null)
p.refs--;
}
if ((proxy & PROXY_GRAMPA) != 0)
node.parent.parent.item.refs--;
if ((proxy & PROXY_GRAMPA) != 0) {
MapTile p = node.parent.parent();
if (p != null)
p.refs--;
}
for (int i = 0; i < 4; i++) {
if ((proxy & (1 << i)) != 0)