From: Perttu Ahola Date: Sun, 16 Oct 2011 22:04:22 +0000 (+0300) Subject: Fix chest not working after walked away and came back X-Git-Tag: 0.3.dev-20111021~35 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b0481b9db1769fa505b68a91f17f1aa6aee66438;p=oweals%2Fminetest.git Fix chest not working after walked away and came back --- diff --git a/src/map.cpp b/src/map.cpp index 2d661a522..63c6ad57c 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -35,6 +35,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "settings.h" #include "log.h" +#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" + /* SQLite format specification: - Initially only replaces sectors/ and sectors2/ @@ -1819,9 +1821,14 @@ NodeMetadata* Map::getNodeMetadata(v3s16 p) v3s16 blockpos = getNodeBlockPos(p); v3s16 p_rel = p - blockpos*MAP_BLOCKSIZE; MapBlock *block = getBlockNoCreateNoEx(blockpos); - if(block == NULL) + if(!block){ + infostream<<"Map::getNodeMetadata(): Need to emerge " + <