2017-04-09 05:51:28 +00:00
|
|
|
#ifndef OPENMW_ACTORPACKETCONTROLLER_HPP
|
|
|
|
#define OPENMW_ACTORPACKETCONTROLLER_HPP
|
|
|
|
|
|
|
|
|
|
|
|
#include <RakPeerInterface.h>
|
|
|
|
#include "../Packets/Actor/ActorPacket.hpp"
|
2017-06-27 14:41:37 +00:00
|
|
|
#include <unordered_map>
|
|
|
|
#include <memory>
|
2017-04-09 05:51:28 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ActorPacketController
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ActorPacketController(RakNet::RakPeerInterface *peer);
|
|
|
|
ActorPacket *GetPacket(RakNet::MessageID id);
|
|
|
|
void SetStream(RakNet::BitStream *inStream, RakNet::BitStream *outStream);
|
|
|
|
|
|
|
|
bool ContainsPacket(RakNet::MessageID id);
|
|
|
|
|
2017-06-27 14:41:37 +00:00
|
|
|
typedef std::unordered_map<unsigned char, std::unique_ptr<ActorPacket> > packets_t;
|
2017-04-09 05:51:28 +00:00
|
|
|
private:
|
|
|
|
packets_t packets;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-04-09 13:32:44 +00:00
|
|
|
#endif //OPENMW_ACTORPACKETCONTROLLER_HPP
|