forked from Mirrorlandia_minetest/minetest
Set block modified flag when node metadata inventory is modified
This commit is contained in:
parent
3b3ca65562
commit
704d8a62bf
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user