mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Fixed chest contents not immediately updating to all players
This commit is contained in:
parent
7df125c249
commit
042834b09d
2 changed files with 15 additions and 2 deletions
|
@ -2741,9 +2741,19 @@ void Server::inventoryModified(InventoryContext *c, std::string id)
|
|||
p.Y = stoi(fn.next(","));
|
||||
p.Z = stoi(fn.next(","));
|
||||
assert(c->current_player);
|
||||
RemoteClient *client = getClient(c->current_player->peer_id);
|
||||
v3s16 blockpos = getNodeBlockPos(p);
|
||||
client->SetBlockNotSent(blockpos);
|
||||
|
||||
/*RemoteClient *client = getClient(c->current_player->peer_id);
|
||||
client->SetBlockNotSent(blockpos);*/
|
||||
|
||||
for(core::map<u16, RemoteClient*>::Iterator
|
||||
i = m_clients.getIterator();
|
||||
i.atEnd()==false; i++)
|
||||
{
|
||||
RemoteClient *client = i.getNode()->getValue();
|
||||
client->SetBlockNotSent(blockpos);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue