openmw-tes3coop/components/openmw-mp/Packets/Object/PacketObjectTrap.cpp

20 lines
484 B
C++
Raw Normal View History

#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketObjectTrap.hpp"
using namespace mwmp;
PacketObjectTrap::PacketObjectTrap(RakNet::RakPeerInterface *peer) : ObjectPacket(peer)
{
packetID = ID_OBJECT_TRAP;
2017-06-02 19:10:47 +00:00
hasCellData = true;
}
2017-06-02 19:10:47 +00:00
void PacketObjectTrap::Object(WorldObject &worldObject, bool send)
{
ObjectPacket::Object(worldObject, send);
2017-06-02 19:10:47 +00:00
RW(worldObject.isDisarmed, send);
2017-06-02 19:10:47 +00:00
if (!worldObject.isDisarmed)
RW(worldObject.position, send);
}