Set block modified flag when node metadata inventory is modified

This commit is contained in:
Perttu Ahola 2011-11-25 15:19:42 +02:00
parent 3b3ca65562
commit 704d8a62bf
1 changed files with 6 additions and 8 deletions

View File

@ -3535,14 +3535,12 @@ void Server::inventoryModified(InventoryContext *c, std::string id)
NodeMetadata *meta = m_env->getMap().getNodeMetadata(p);
if(meta)
meta->inventoryModified();
for(core::map<u16, RemoteClient*>::Iterator
i = m_clients.getIterator();
i.atEnd()==false; i++)
{
RemoteClient *client = i.getNode()->getValue();
client->SetBlockNotSent(blockpos);
}
MapBlock *block = m_env.getMap().getBlockNoCreateNoEx(blockpos);
if(block)
block->raiseModified(MOD_STATE_WRITE_NEEDED);
setBlockNotSent(blockpos);
return;
}