2017-05-24 16:01:28 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
#include "PacketObjectTrap.hpp"
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2018-05-12 16:40:00 +00:00
|
|
|
PacketObjectTrap::PacketObjectTrap(RakNet::RakPeerInterface *peer) : ObjectPacket(peer)
|
2017-05-24 16:01:28 +00:00
|
|
|
{
|
|
|
|
packetID = ID_OBJECT_TRAP;
|
2017-06-02 19:10:47 +00:00
|
|
|
hasCellData = true;
|
2017-05-24 16:01:28 +00:00
|
|
|
}
|
|
|
|
|
2018-05-12 21:42:24 +00:00
|
|
|
void PacketObjectTrap::Object(BaseObject &baseObject, bool send)
|
2017-05-24 16:01:28 +00:00
|
|
|
{
|
2018-05-12 21:42:24 +00:00
|
|
|
ObjectPacket::Object(baseObject, send);
|
|
|
|
RW(baseObject.isDisarmed, send);
|
2017-05-24 16:01:28 +00:00
|
|
|
|
2018-05-12 21:42:24 +00:00
|
|
|
if (!baseObject.isDisarmed)
|
|
|
|
RW(baseObject.position, send);
|
2017-05-24 16:01:28 +00:00
|
|
|
}
|