forked from teamnwah/openmw-tes3coop
Add and implement ID_WORLD_OBJECT_LOCK
parent
3a5a5e73a1
commit
3fd93896f2
@ -0,0 +1,24 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include "PacketObjectLock.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketObjectLock::PacketObjectLock(RakNet::RakPeerInterface *peer) : WorldPacket(peer)
|
||||
{
|
||||
packetID = ID_WORLD_OBJECT_LOCK;
|
||||
}
|
||||
|
||||
void PacketObjectLock::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send)
|
||||
{
|
||||
WorldPacket::Packet(bs, event, send);
|
||||
|
||||
RW(event->cellRef.mRefID, send);
|
||||
RW(event->cellRef.mRefNum.mIndex, send);
|
||||
|
||||
RW(event->cell.mData.mFlags, send);
|
||||
RW(event->cell.mData.mX, send);
|
||||
RW(event->cell.mData.mY, send);
|
||||
RW(event->cell.mName, send);
|
||||
|
||||
RW(event->lockLevel, send);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETOBJECTLOCK_HPP
|
||||
#define OPENMW_PACKETOBJECTLOCK_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketObjectLock : public WorldPacket
|
||||
{
|
||||
public:
|
||||
PacketObjectLock(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETOBJECTLOCK_HPP
|
Loading…
Reference in New Issue