From f8c3743991a6897c7133bf35dc2699b8b5f9df7c Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 19 Mar 2012 03:04:16 +0100 Subject: added PlayerSAO and RemotePlayer, removed ServerRemotePlayer --- src/client.cpp | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 29872fb6e..7f1b39c33 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1397,45 +1397,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) } else if(command == TOCLIENT_PLAYERITEM) { - std::string datastring((char*)&data[2], datasize-2); - std::istringstream is(datastring, std::ios_base::binary); - - u16 count = readU16(is); - - for (u16 i = 0; i < count; ++i) { - u16 peer_id = readU16(is); - Player *player = m_env.getPlayer(peer_id); - - if (player == NULL) - { - infostream<<"Client: ignoring player item " - << deSerializeString(is) - << " for non-existing peer id " << peer_id - << std::endl; - continue; - } else if (player->isLocal()) { - infostream<<"Client: ignoring player item " - << deSerializeString(is) - << " for local player" << std::endl; - continue; - } else { - InventoryList *inv = player->inventory.getList("main"); - std::string itemstring(deSerializeString(is)); - ItemStack item; - item.deSerialize(itemstring, m_itemdef); - inv->changeItem(0, item); - if(itemstring.empty()) - { - infostream<<"Client: empty player item for peer " - <