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:
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