From: Perttu Ahola Date: Fri, 25 Nov 2011 15:42:41 +0000 (+0200) Subject: Don't allow placing CONTENT_IGNORE with Map::setNode() because it is never useful... X-Git-Tag: 0.4.dev-20111201-0~95 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=74770ab71818a16b49274ac2261c0577cbdccfce;p=oweals%2Fminetest.git Don't allow placing CONTENT_IGNORE with Map::setNode() because it is never useful and is only caused by bugs. --- diff --git a/src/map.cpp b/src/map.cpp index 822b3f659..3f858ed67 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -208,6 +208,15 @@ void Map::setNode(v3s16 p, MapNode & n) v3s16 blockpos = getNodeBlockPos(p); MapBlock *block = getBlockNoCreate(blockpos); v3s16 relpos = p - blockpos*MAP_BLOCKSIZE; + // Never allow placing CONTENT_IGNORE, it fucks up stuff + if(n.getContent() == CONTENT_IGNORE){ + errorstream<<"Map::setNode(): Not allowing to place CONTENT_IGNORE" + <<" while trying to replace \"" + <ndef()->get(block->getNodeNoCheck(relpos)).name + <<"\" at "<setNodeNoCheck(relpos, n); }