openmw-tes3coop/components/openmw-mp/Packets/Actor/ActorPacket.hpp
Koncord 2cb0ea20f0 [General] Modernize packets
Use explicit for constructors
Use override instead virtual for inherited methods
Mark final derived classes as "final"
2017-12-09 10:13:27 +08:00

33 lines
823 B
C++

#ifndef OPENMW_ACTORPACKET_HPP
#define OPENMW_ACTORPACKET_HPP
#include <string>
#include <RakNetTypes.h>
#include <BitStream.h>
#include <PacketPriority.h>
#include <components/openmw-mp/Base/BaseActor.hpp>
#include <components/openmw-mp/Packets/BasePacket.hpp>
namespace mwmp
{
class ActorPacket : public BasePacket
{
public:
explicit ActorPacket(RakNet::RakPeerInterface *peer);
~ActorPacket() override = default;
void setActorList(BaseActorList *actorList);
void Packet(RakNet::BitStream *bs, bool send) override;
protected:
bool PacketHeader(RakNet::BitStream *bs, bool send);
virtual void Actor(BaseActor &actor, bool send) {};
BaseActorList *actorList;
static const int maxActors = 3000;
};
}
#endif //OPENMW_ACTORPACKET_HPP