mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Set sky API: Add bool for clouds in front of custom skybox
Default true. Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API. Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of 'm_visible' (whether normal sky is visible).
This commit is contained in:
@@ -1192,11 +1192,17 @@ void Client::handleCommand_HudSetSky(NetworkPacket* pkt)
|
||||
for (size_t i = 0; i < count; i++)
|
||||
params->push_back(deSerializeString(is));
|
||||
|
||||
bool clouds = true;
|
||||
try {
|
||||
clouds = readU8(is);
|
||||
} catch (...) {}
|
||||
|
||||
ClientEvent event;
|
||||
event.type = CE_SET_SKY;
|
||||
event.set_sky.bgcolor = bgcolor;
|
||||
event.set_sky.type = type;
|
||||
event.set_sky.params = params;
|
||||
event.set_sky.clouds = clouds;
|
||||
m_client_event_queue.push(event);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user