summaryrefslogtreecommitdiff
path: root/src/network/clientpackethandler.cpp
diff options
context:
space:
mode:
authorWuzzy <Wuzzy@disroot.org>2022-07-02 18:57:48 +0000
committerGitHub <noreply@github.com>2022-07-02 19:57:48 +0100
commit142928e944db089cccce6c0ea32a89b32300b3d1 (patch)
tree666fa8664a4a0a4d2d365d24ff61448e257759cc /src/network/clientpackethandler.cpp
parentb095dc4f2bf2a1ace010dfae0ead69654b0ca3ac (diff)
downloadminetest-142928e944db089cccce6c0ea32a89b32300b3d1.tar.gz
minetest-142928e944db089cccce6c0ea32a89b32300b3d1.tar.bz2
minetest-142928e944db089cccce6c0ea32a89b32300b3d1.zip
Allow to set maximum star opacity at daytime (#11663)
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r--src/network/clientpackethandler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 764f6569f..fba0fe72d 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -1340,10 +1340,13 @@ void Client::handleCommand_HudSetMoon(NetworkPacket *pkt)
void Client::handleCommand_HudSetStars(NetworkPacket *pkt)
{
- StarParams stars;
+ StarParams stars = SkyboxDefaults::getStarDefaults();
*pkt >> stars.visible >> stars.count
>> stars.starcolor >> stars.scale;
+ try {
+ *pkt >> stars.day_opacity;
+ } catch (PacketError &e) {};
ClientEvent *event = new ClientEvent();
event->type = CE_SET_STARS;