forked from teamnwah/openmw-tes3coop
[General] Turn PlayerRegionAuthority into WorldRegionAuthority
WorldRegionAuthority is a Worldstate packet.fix/skillcap
parent
d5d3c0937f
commit
9823a77bf2
@ -1,23 +0,0 @@
|
|||||||
#ifndef OPENMW_PROCESSORPLAYERREGIONAUTHORITY_HPP
|
|
||||||
#define OPENMW_PROCESSORPLAYERREGIONAUTHORITY_HPP
|
|
||||||
|
|
||||||
#include "../PlayerProcessor.hpp"
|
|
||||||
|
|
||||||
namespace mwmp
|
|
||||||
{
|
|
||||||
class ProcessorPlayerRegionAuthority : public PlayerProcessor
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ProcessorPlayerRegionAuthority()
|
|
||||||
{
|
|
||||||
BPP_INIT(ID_PLAYER_REGION_AUTHORITY)
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
||||||
{
|
|
||||||
// Placeholder to be filled in later
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //OPENMW_PROCESSORPLAYERREGIONAUTHORITY_HPP
|
|
@ -0,0 +1,31 @@
|
|||||||
|
#ifndef OPENMW_PROCESSORWORLDREGIONAUTHORITY_HPP
|
||||||
|
#define OPENMW_PROCESSORWORLDREGIONAUTHORITY_HPP
|
||||||
|
|
||||||
|
#include "../PlayerProcessor.hpp"
|
||||||
|
|
||||||
|
namespace mwmp
|
||||||
|
{
|
||||||
|
class ProcessorWorldRegionAuthority : public WorldstateProcessor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ProcessorWorldRegionAuthority()
|
||||||
|
{
|
||||||
|
BPP_INIT(ID_WORLD_REGION_AUTHORITY)
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void Do(WorldstatePacket &packet, Worldstate &worldstate)
|
||||||
|
{
|
||||||
|
if (isLocal())
|
||||||
|
{
|
||||||
|
LOG_APPEND(Log::LOG_INFO, "- The new region authority for %s is me");
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //OPENMW_PROCESSORWORLDREGIONAUTHORITY_HPP
|
@ -1,16 +1,16 @@
|
|||||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
#include "PacketPlayerRegionAuthority.hpp"
|
#include "PacketWorldRegionAuthority.hpp"
|
||||||
|
|
||||||
mwmp::PacketPlayerRegionAuthority::PacketPlayerRegionAuthority(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
mwmp::PacketWorldRegionAuthority::PacketWorldRegionAuthority(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||||
{
|
{
|
||||||
packetID = ID_PLAYER_REGION_AUTHORITY;
|
packetID = ID_WORLD_REGION_AUTHORITY;
|
||||||
priority = IMMEDIATE_PRIORITY;
|
priority = IMMEDIATE_PRIORITY;
|
||||||
reliability = RELIABLE_ORDERED;
|
reliability = RELIABLE_ORDERED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mwmp::PacketPlayerRegionAuthority::Packet(RakNet::BitStream *bs, bool send)
|
void mwmp::PacketWorldRegionAuthority::Packet(RakNet::BitStream *bs, bool send)
|
||||||
{
|
{
|
||||||
PlayerPacket::Packet(bs, send);
|
PlayerPacket::Packet(bs, send);
|
||||||
|
|
||||||
// Placeholder to be filled in later
|
RW(player->authorityRegion, send, true);
|
||||||
}
|
}
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
#ifndef OPENMW_PACKETPLAYERREGIONAUTHORITY_HPP
|
|
||||||
#define OPENMW_PACKETPLAYERREGIONAUTHORITY_HPP
|
|
||||||
|
|
||||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
|
||||||
|
|
||||||
namespace mwmp
|
|
||||||
{
|
|
||||||
class PacketPlayerRegionAuthority : public PlayerPacket
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PacketPlayerRegionAuthority(RakNet::RakPeerInterface *peer);
|
|
||||||
|
|
||||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //OPENMW_PACKETPLAYERREGIONAUTHORITY_HPP
|
|
@ -0,0 +1,16 @@
|
|||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
#include "PacketWorldRegionAuthority.hpp"
|
||||||
|
|
||||||
|
mwmp::PacketWorldRegionAuthority::PacketWorldRegionAuthority(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer)
|
||||||
|
{
|
||||||
|
packetID = ID_WORLD_REGION_AUTHORITY;
|
||||||
|
priority = IMMEDIATE_PRIORITY;
|
||||||
|
reliability = RELIABLE_ORDERED;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mwmp::PacketWorldRegionAuthority::Packet(RakNet::BitStream *bs, bool send)
|
||||||
|
{
|
||||||
|
WorldstatePacket::Packet(bs, send);
|
||||||
|
|
||||||
|
RW(worldstate->authorityRegion, send, true);
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef OPENMW_PACKETWORLDREGIONAUTHORITY_HPP
|
||||||
|
#define OPENMW_PACKETWORLDREGIONAUTHORITY_HPP
|
||||||
|
|
||||||
|
#include <components/openmw-mp/Packets/Worldstate/WorldstatePacket.hpp>
|
||||||
|
|
||||||
|
namespace mwmp
|
||||||
|
{
|
||||||
|
class PacketWorldRegionAuthority : public WorldstatePacket
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PacketWorldRegionAuthority(RakNet::RakPeerInterface *peer);
|
||||||
|
|
||||||
|
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //OPENMW_PACKETWORLDREGIONAUTHORITY_HPP
|
Loading…
Reference in New Issue