Exemple #1
0
MapBlock * Map::createBlankBlock(v3s16 & p)
{
	MapBlock *block = createBlankBlockNoInsert(p);
	
	m_blocks[p] = block;

	return block;
}
Exemple #2
0
MapBlock * MapSector::createBlankBlock(s16 y)
{
	MapBlock *block = createBlankBlockNoInsert(y);
	
	m_blocks.insert(y, block);

	return block;
}
Exemple #3
0
MapBlock * Map::createBlankBlock(v3POS & p) {
	auto lock = m_blocks.lock_unique_rec();
	MapBlock *block = getBlockNoCreateNoEx(p, false, true);
	if (block != NULL) {
		infostream << "Block already created p=" << block->getPos() << std::endl;
		return block;
	}

	block = createBlankBlockNoInsert(p);

	m_blocks.set(p, block);

	return block;
}