mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Allow fog color to be overriden properly (#14296)
This commit is contained in:
parent
a29d3cf074
commit
9e3a11534f
11 changed files with 96 additions and 84 deletions
|
@ -1826,22 +1826,21 @@ void Server::SendSetSky(session_t peer_id, const SkyboxParams ¶ms)
|
|||
pkt << params.clouds;
|
||||
} else { // Handle current clients and future clients
|
||||
pkt << params.bgcolor << params.type
|
||||
<< params.clouds << params.fog_sun_tint
|
||||
<< params.fog_moon_tint << params.fog_tint_type;
|
||||
<< params.clouds << params.fog_sun_tint
|
||||
<< params.fog_moon_tint << params.fog_tint_type;
|
||||
|
||||
if (params.type == "skybox") {
|
||||
pkt << (u16) params.textures.size();
|
||||
for (const std::string &texture : params.textures)
|
||||
pkt << texture;
|
||||
} else if (params.type == "regular") {
|
||||
pkt << params.sky_color.day_sky << params.sky_color.day_horizon
|
||||
<< params.sky_color.dawn_sky << params.sky_color.dawn_horizon
|
||||
<< params.sky_color.night_sky << params.sky_color.night_horizon
|
||||
<< params.sky_color.indoors;
|
||||
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;
|
||||
}
|
||||
|
||||
pkt << params.body_orbit_tilt;
|
||||
pkt << params.fog_distance << params.fog_start;
|
||||
pkt << params.body_orbit_tilt << params.fog_distance << params.fog_start
|
||||
<< params.fog_color;
|
||||
}
|
||||
|
||||
Send(&pkt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue