mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-18 07:15:07 -05:00
Don't allow placing CONTENT_IGNORE with Map::setNode() because it is never useful and is only caused by bugs.
This commit is contained in:
parent
6153a2fb10
commit
74770ab718
@ -208,6 +208,15 @@ void Map::setNode(v3s16 p, MapNode & n)
|
|||||||
v3s16 blockpos = getNodeBlockPos(p);
|
v3s16 blockpos = getNodeBlockPos(p);
|
||||||
MapBlock *block = getBlockNoCreate(blockpos);
|
MapBlock *block = getBlockNoCreate(blockpos);
|
||||||
v3s16 relpos = p - blockpos*MAP_BLOCKSIZE;
|
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 \""
|
||||||
|
<<m_gamedef->ndef()->get(block->getNodeNoCheck(relpos)).name
|
||||||
|
<<"\" at "<<PP(p)<<" (block "<<PP(blockpos)<<")"<<std::endl;
|
||||||
|
debug_stacks_print_to(errorstream);
|
||||||
|
return;
|
||||||
|
}
|
||||||
block->setNodeNoCheck(relpos, n);
|
block->setNodeNoCheck(relpos, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user