1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

more reorganizing of map code

This commit is contained in:
Perttu Ahola 2011-06-26 01:31:43 +03:00
parent cb130d9158
commit 2915bd5518
10 changed files with 38 additions and 40 deletions

View file

@ -856,16 +856,7 @@ bool MapBlockObjectList::wrapObject(MapBlockObject *object)
assert(m_objects.find(object->m_id) != NULL);
assert(m_objects[object->m_id] == object);
NodeContainer *parentcontainer = m_block->getParent();
// This will only work if the parent is the map
if(parentcontainer->nodeContainerId() != NODECONTAINER_ID_MAP)
{
dstream<<"WARNING: Wrapping object not possible: "
"MapBlock's parent is not map"<<std::endl;
return true;
}
// OK, we have the map!
Map *map = (Map*)parentcontainer;
Map *map = m_block->getParent();
// Calculate blockpos on map
v3s16 oldblock_pos_i_on_map = m_block->getPosRelative();