1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Convert transparency flag to skybox types

This commit is contained in:
MirceaKitsune 2025-04-23 22:53:42 +03:00
parent ab3073e425
commit de5328c851
8 changed files with 28 additions and 34 deletions

View file

@ -1859,16 +1859,18 @@ void Server::SendSetSky(session_t peer_id, const SkyboxParams &params)
pkt << params.clouds;
} else { // Handle current clients and future clients
pkt << params.bgcolor << params.type << params.transparency
pkt << params.bgcolor << params.type
<< params.clouds << params.fog_sun_tint
<< params.fog_moon_tint << params.fog_tint_type;
if (params.type == "skybox") {
if (params.type == "skybox" ||
params.type == "skybox_back" || params.type == "skybox_front") {
pkt << (u16) params.textures.size();
for (const std::string &texture : params.textures)
pkt << texture;
}
if (params.type == "regular" || params.type == "skybox") {
if (params.type == "regular" || params.type == "skybox" ||
params.type == "skybox_back" || params.type == "skybox_front") {
auto &c = params.sky_color;
pkt << c.day_sky << c.day_horizon << c.dawn_sky << c.dawn_horizon
<< c.night_sky << c.night_horizon << c.indoors;