mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-24 12:53:52 +00:00
17ee3d54e4
Previously, sending a PlayerCellChange packet and a WorldRegionAuthority packet to the player at the same time made the latter arrive first even if the former was intended by a server script to arrive first.
17 lines
617 B
C++
17 lines
617 B
C++
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include "PacketWorldRegionAuthority.hpp"
|
|
|
|
mwmp::PacketWorldRegionAuthority::PacketWorldRegionAuthority(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer)
|
|
{
|
|
packetID = ID_WORLD_REGION_AUTHORITY;
|
|
// Make sure the priority is lower than PlayerCellChange's, so it doesn't get sent before it
|
|
priority = HIGH_PRIORITY;
|
|
reliability = RELIABLE_ORDERED;
|
|
}
|
|
|
|
void mwmp::PacketWorldRegionAuthority::Packet(RakNet::BitStream *newBitstream, bool send)
|
|
{
|
|
WorldstatePacket::Packet(newBitstream, send);
|
|
|
|
RW(worldstate->authorityRegion, send, true);
|
|
}
|