RollbackNode::RollbackNode(Map *map, v3s16 p, IGameDef *gamedef)
{
- INodeDefManager *ndef = gamedef->ndef();
+ const NodeDefManager *ndef = gamedef->ndef();
MapNode n = map->getNodeNoEx(p);
name = ndef->get(n).name;
param1 = n.param1;
NodeMetadata *metap = map->getNodeMetadata(p);
if (metap) {
std::ostringstream os(std::ios::binary);
- metap->serialize(os);
+ metap->serialize(os, 1); // FIXME: version bump??
meta = os.str();
}
}
// If metadata differs, action is always important
if(n_old.meta != n_new.meta)
return true;
- INodeDefManager *ndef = gamedef->ndef();
+ const NodeDefManager *ndef = gamedef->ndef();
// Both are of the same name, so a single definition is needed
const ContentFeatures &def = ndef->get(n_old.name);
// If the type is flowing liquid, action is not important
case TYPE_NOTHING:
return true;
case TYPE_SET_NODE: {
- INodeDefManager *ndef = gamedef->ndef();
+ const NodeDefManager *ndef = gamedef->ndef();
// Make sure position is loaded from disk
map->emergeBlock(getContainerPos(p, MAP_BLOCKSIZE), false);
// Check current node
}
}
std::istringstream is(n_old.meta, std::ios::binary);
- meta->deSerialize(is);
+ meta->deSerialize(is, 1); // FIXME: version bump??
}
// Inform other things that the meta data has changed
v3s16 blockpos = getContainerPos(p, MAP_BLOCKSIZE);