Fixed chest contents not immediately updating to all players
authorPerttu Ahola <celeron55@gmail.com>
Mon, 4 Apr 2011 15:29:44 +0000 (18:29 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 4 Apr 2011 15:29:44 +0000 (18:29 +0300)
src/main.cpp
src/server.cpp

index 49246ec8939f18e4c4a6589b4ad92351c08cb20d..df5bca21ee24ba944d65f4b431b2216ba6bf916e 100644 (file)
@@ -203,6 +203,9 @@ FIXME: Server sometimes goes into some infinite PeerNotFoundException loop
 TODO: Player health points\r
        - When player dies, throw items on map\r
 \r
+FIXME: If something is removed from craftresult with a right click,\r
+       it is only possible to get one item from it should give 4\r
+\r
 Objects:\r
 --------\r
 \r
index a70c42a358eafd306829062437609bae2665c182..7266a6ddfe6c268d4143462bffbe1cd8bb2633a8 100644 (file)
@@ -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;
        }