From 1ef6ad6215416d1e2dfa0cd7e84e1108e58f4771 Mon Sep 17 00:00:00 2001 From: Koncord Date: Sun, 10 Dec 2017 09:48:29 +0800 Subject: [PATCH] [General] Add weather struct and packet --- components/openmw-mp/Base/BasePlayer.hpp | 6 ++++++ components/openmw-mp/Packets/Player/PacketGameWeather.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/openmw-mp/Base/BasePlayer.hpp b/components/openmw-mp/Base/BasePlayer.hpp index 79af7c271..ba05a2193 100644 --- a/components/openmw-mp/Base/BasePlayer.hpp +++ b/components/openmw-mp/Base/BasePlayer.hpp @@ -288,6 +288,12 @@ namespace mwmp unsigned int resurrectType; bool diedSinceArrestAttempt; + + struct + { + int currentWeather, nextWeather; + float updateTime, transitionFactor; + } weather; }; } diff --git a/components/openmw-mp/Packets/Player/PacketGameWeather.cpp b/components/openmw-mp/Packets/Player/PacketGameWeather.cpp index d02d51850..bcdc7a9d5 100644 --- a/components/openmw-mp/Packets/Player/PacketGameWeather.cpp +++ b/components/openmw-mp/Packets/Player/PacketGameWeather.cpp @@ -13,5 +13,5 @@ void PacketGameWeather::Packet(RakNet::BitStream *bs, bool send) { PlayerPacket::Packet(bs, send); - // Placeholder to be filled in later + RW(player->weather, send); }