2016-08-30 05:24:31 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
2018-06-07 09:49:12 +00:00
|
|
|
#include "PacketWorldTime.hpp"
|
2016-08-30 05:24:31 +00:00
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2018-05-22 05:53:33 +00:00
|
|
|
PacketWorldTime::PacketWorldTime(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer)
|
2016-08-30 05:24:31 +00:00
|
|
|
{
|
2018-05-22 05:53:33 +00:00
|
|
|
packetID = ID_WORLD_TIME;
|
2018-05-23 04:51:18 +00:00
|
|
|
orderChannel = CHANNEL_WORLDSTATE;
|
2016-08-30 05:24:31 +00:00
|
|
|
}
|
|
|
|
|
2019-12-04 08:17:33 +00:00
|
|
|
void PacketWorldTime::Packet(RakNet::BitStream *newBitstream, bool send)
|
2016-08-30 05:24:31 +00:00
|
|
|
{
|
2019-12-04 08:17:33 +00:00
|
|
|
WorldstatePacket::Packet(newBitstream, send);
|
2016-08-30 05:24:31 +00:00
|
|
|
|
2018-07-26 16:01:27 +00:00
|
|
|
RW(worldstate->time.hour, send);
|
|
|
|
RW(worldstate->time.day, send);
|
|
|
|
RW(worldstate->time.month, send);
|
|
|
|
RW(worldstate->time.year, send);
|
2018-05-24 11:02:04 +00:00
|
|
|
|
2018-07-26 16:01:27 +00:00
|
|
|
RW(worldstate->time.daysPassed, send);
|
|
|
|
RW(worldstate->time.timeScale, send);
|
2017-01-26 04:17:29 +00:00
|
|
|
}
|