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

Universal skybox type checks, simplify sky type application, formatting fixes

This commit is contained in:
MirceaKitsune 2025-06-01 00:28:48 +03:00
parent 79f46800f3
commit cc363a77d7
8 changed files with 55 additions and 68 deletions

View file

@ -1865,14 +1865,12 @@ void Server::SendSetSky(session_t peer_id, const SkyboxParams &params)
<< params.clouds << params.fog_sun_tint
<< params.fog_moon_tint << params.fog_tint_type;
if (params.type == "skybox" ||
params.type == "skybox_back" || params.type == "skybox_front") {
if (params.isSkybox()) {
pkt << (u16) params.textures.size();
for (const std::string &texture : params.textures)
pkt << texture;
}
if (params.type == "regular" ||
params.type == "skybox_back" || params.type == "skybox_front") {
if (params.isTransparent()) {
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;