From 042834b09d8d2d814204244e3a64f5fb1cb7582c Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 4 Apr 2011 18:29:44 +0300 Subject: [PATCH] Fixed chest contents not immediately updating to all players --- src/main.cpp | 3 +++ src/server.cpp | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 49246ec8..df5bca21 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -203,6 +203,9 @@ FIXME: Server sometimes goes into some infinite PeerNotFoundException loop TODO: Player health points - When player dies, throw items on map +FIXME: If something is removed from craftresult with a right click, + it is only possible to get one item from it should give 4 + Objects: -------- diff --git a/src/server.cpp b/src/server.cpp index a70c42a3..7266a6dd 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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::Iterator + i = m_clients.getIterator(); + i.atEnd()==false; i++) + { + RemoteClient *client = i.getNode()->getValue(); + client->SetBlockNotSent(blockpos); + } + return; }