2018-05-16 21:08:37 +00:00
|
|
|
#ifndef OPENMW_OBJECTPACKET_HPP
|
|
|
|
#define OPENMW_OBJECTPACKET_HPP
|
2016-10-19 17:36:11 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <RakNetTypes.h>
|
|
|
|
#include <BitStream.h>
|
|
|
|
#include <PacketPriority.h>
|
2018-05-12 21:42:24 +00:00
|
|
|
#include <components/openmw-mp/Base/BaseObject.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
|
|
|
|
2018-05-12 21:42:24 +00:00
|
|
|
void setObjectList(BaseObjectList *objectList);
|
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:
|
2018-05-12 21:42:24 +00:00
|
|
|
virtual void Object(BaseObject &baseObject, bool send);
|
2017-06-02 19:10:47 +00:00
|
|
|
bool PacketHeader(RakNet::BitStream *bs, bool send);
|
2018-05-12 21:42:24 +00:00
|
|
|
BaseObjectList *objectList;
|
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
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-05-16 21:08:37 +00:00
|
|
|
#endif //OPENMW_OBJECTPACKET_HPP
|