2018-05-22 05:53:33 +00:00
|
|
|
#include "PacketWorldTime.hpp"
|
2016-08-30 05:24:31 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2018-05-22 05:53:33 +00:00
|
|
|
void PacketWorldTime::Packet(RakNet::BitStream *bs, bool send)
|
2016-08-30 05:24:31 +00:00
|
|
|
{
|
2018-05-21 04:14:08 +00:00
|
|
|
WorldstatePacket::Packet(bs, send);
|
2016-08-30 05:24:31 +00:00
|
|
|
|
2018-05-21 04:14:08 +00:00
|
|
|
RW(worldstate->month, send);
|
|
|
|
RW(worldstate->day, send);
|
|
|
|
RW(worldstate->hour, send);
|
2018-05-23 05:31:25 +00:00
|
|
|
RW(worldstate->timeScale, send);
|
2017-01-26 04:17:29 +00:00
|
|
|
}
|