1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-24 08:28:49 -05:00

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

View File

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