aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorsofar <sofar@foo-projects.org>2023-02-25 16:08:33 -0800
committerGitHub <noreply@github.com>2023-02-26 01:08:33 +0100
commit2083252c05ece1e47c1c476fda2b9eda3bf332a0 (patch)
tree3af58a210bad99834110e4aff820ce04ee839b2b /src/network
parent6e1c70e02b00df94a584bb4247cfa4f4c616c8d5 (diff)
downloadminetest-2083252c05ece1e47c1c476fda2b9eda3bf332a0.tar.xz
Sky: transmit body_orbit_tilt to client. (#13193)
This obsoletes the current client-side setting entirely. The server can transmit the tilt to the client directly and will send 0.0f as default value. Co-authored-by: x2048 <codeforsmile@gmail.com> Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp4
-rw-r--r--src/network/networkprotocol.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 9c9d8276e..c64541d77 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -1367,6 +1367,10 @@ void Client::handleCommand_HudSetSky(NetworkPacket* pkt)
>> skybox.sky_color.indoors;
}
+ try {
+ *pkt >> skybox.body_orbit_tilt;
+ } catch (PacketError &e) {}
+
ClientEvent *event = new ClientEvent();
event->type = CE_SET_SKY;
event->set_sky = new SkyboxParams(skybox);
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h
index 4e50ef533..d456f19bf 100644
--- a/src/network/networkprotocol.h
+++ b/src/network/networkprotocol.h
@@ -701,6 +701,7 @@ enum ToClientCommand
u8[4] fog_sun_tint (ARGB)
u8[4] fog_moon_tint (ARGB)
std::string fog_tint_type
+ float body_orbit_tilt
*/
TOCLIENT_OVERRIDE_DAY_NIGHT_RATIO = 0x50,