2016-10-19 17:36:11 +00:00
|
|
|
#ifndef OPENMW_WORLDPACKET_HPP
|
|
|
|
#define OPENMW_WORLDPACKET_HPP
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <RakNetTypes.h>
|
|
|
|
#include <BitStream.h>
|
|
|
|
#include <PacketPriority.h>
|
2017-02-06 10:53:41 +00:00
|
|
|
#include <components/openmw-mp/Base/BaseEvent.hpp>
|
2016-10-19 17:36:11 +00:00
|
|
|
|
|
|
|
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2018-05-12 16:40:00 +00:00
|
|
|
class ObjectPacket : public BasePacket
|
2016-10-19 17:36:11 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-05-12 16:40:00 +00:00
|
|
|
ObjectPacket(RakNet::RakPeerInterface *peer);
|
2016-10-19 17:36:11 +00:00
|
|
|
|
2018-05-12 16:40:00 +00:00
|
|
|
~ObjectPacket();
|
2016-10-19 17:36:11 +00:00
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
void setEvent(BaseEvent *event);
|
2016-10-19 17:36:11 +00:00
|
|
|
|
2017-06-02 19:10:47 +00:00
|
|
|
virtual void Packet(RakNet::BitStream *bs, bool send);
|
|
|
|
|
2016-10-19 17:36:11 +00:00
|
|
|
protected:
|
2017-06-02 19:10:47 +00:00
|
|
|
virtual void Object(WorldObject &worldObject, bool send);
|
|
|
|
bool PacketHeader(RakNet::BitStream *bs, bool send);
|
2017-02-06 10:53:41 +00:00
|
|
|
BaseEvent *event;
|
2017-06-01 22:35:32 +00:00
|
|
|
static const int maxObjects = 3000;
|
2017-06-02 19:10:47 +00:00
|
|
|
bool hasCellData;
|
2016-10-19 17:36:11 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_WORLDPACKET_HPP
|