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

Fix type checks

This commit is contained in:
MirceaKitsune 2025-04-23 23:58:36 +03:00
parent de5328c851
commit fcd65f0b99
4 changed files with 9 additions and 8 deletions

View file

@ -1852,7 +1852,7 @@ void Server::SendSetSky(session_t peer_id, const SkyboxParams &params)
// Handle prior clients here
if (m_clients.getProtocolVersion(peer_id) < 39) {
pkt << params.bgcolor << params.type << std::string("solid") << (u16) params.textures.size();
pkt << params.bgcolor << params.type << (u16) params.textures.size();
for (const std::string& texture : params.textures)
pkt << texture;
@ -1869,7 +1869,7 @@ void Server::SendSetSky(session_t peer_id, const SkyboxParams &params)
for (const std::string &texture : params.textures)
pkt << texture;
}
if (params.type == "regular" || params.type == "skybox" ||
if (params.type == "regular" ||
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