Skip to content

An OpenMW mod that lets you play the whole Elder Scrolls III: Morrowind as a top-down isometric game — with full online co-op or MMO modes.

C++
887 B
Raw Blame
#ifndef OPENMW_OBJECTPACKET_HPP
#define OPENMW_OBJECTPACKET_HPP

#include <string>
#include <components/openmw-mp/RakNetIncludes.hpp>
#include <BitStream.h>
#include <PacketPriority.h>
#include <components/openmw-mp/Base/BaseObject.hpp>

#include <components/openmw-mp/Packets/BasePacket.hpp>


namespace mwmp
{
    class ObjectPacket : public BasePacket
    {
    public:
        ObjectPacket(RakNet::RakPeerInterface *peer);

        ~ObjectPacket();

        void setObjectList(BaseObjectList *newObjectList);

        virtual void Packet(RakNet::BitStream *newBitstream, bool send);

    protected:
        virtual void Object(BaseObject &baseObject, bool send);
        bool PacketHeader(RakNet::BitStream *newBitstream, bool send);
        BaseObjectList *objectList;
        static const int maxObjects = 3000;
        bool hasCellData;
    };
}

#endif //OPENMW_OBJECTPACKET_HPP