diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp index 1327feb1f..fdfb49c84 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1688,6 +1688,16 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) } infostream<<std::endl; } + else if(command == TOCLIENT_INVENTORY_FORMSPEC) + { + std::string datastring((char*)&data[2], datasize-2); + std::istringstream is(datastring, std::ios_base::binary); + + // Store formspec in LocalPlayer + Player *player = m_env.getLocalPlayer(); + assert(player != NULL); + player->inventory_formspec = deSerializeLongString(is); + } else { infostream<<"Client: Ignoring unknown command " |