mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 05:19:55 +00:00
420dab10e1
This allows the OnPCDrop variable to get set correctly even when object placements have to go through the server first in order to gain a unique multiplayer index (mpNum). Among other things, this makes it possible to roll marijuana joints in the popular mod "Tribunal Code Patch".
21 lines
603 B
C++
21 lines
603 B
C++
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include "PacketObjectPlace.hpp"
|
|
|
|
using namespace mwmp;
|
|
|
|
PacketObjectPlace::PacketObjectPlace(RakNet::RakPeerInterface *peer) : WorldPacket(peer)
|
|
{
|
|
packetID = ID_OBJECT_PLACE;
|
|
hasCellData = true;
|
|
}
|
|
|
|
void PacketObjectPlace::Object(WorldObject &worldObject, bool send)
|
|
{
|
|
WorldPacket::Object(worldObject, send);
|
|
RW(worldObject.count, send);
|
|
RW(worldObject.charge, send);
|
|
RW(worldObject.enchantmentCharge, send);
|
|
RW(worldObject.goldValue, send);
|
|
RW(worldObject.position, send);
|
|
RW(worldObject.droppedByPlayer, send);
|
|
}
|