summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index cc1ec2a98..48b00377f 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2026,6 +2026,25 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
((LocalPlayer *) player)->hotbar_selected_image = value;
}
}
+ else if(command == TOCLIENT_SET_SKY)
+ {
+ std::string datastring((char *)&data[2], datasize - 2);
+ std::istringstream is(datastring, std::ios_base::binary);
+
+ video::SColor *bgcolor = new video::SColor(readARGB8(is));
+ std::string *type = new std::string(deSerializeString(is));
+ u16 count = readU16(is);
+ std::vector<std::string> *params = new std::vector<std::string>;
+ for(size_t i=0; i<count; i++)
+ params->push_back(deSerializeString(is));
+
+ ClientEvent event;
+ event.type = CE_SET_SKY;
+ event.set_sky.bgcolor = bgcolor;
+ event.set_sky.type = type;
+ event.set_sky.params = params;
+ m_client_event_queue.push_back(event);
+ }
else
{
infostream<<"Client: Ignoring unknown command "