forked from teamnwah/openmw-tes3coop
commit
bdafa8e9ab
@ -0,0 +1,32 @@
|
||||
#ifndef OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|
||||
#define OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|
||||
|
||||
|
||||
#include "../PlayerProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorPlayerMomentum : public PlayerProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorPlayerMomentum()
|
||||
{
|
||||
BPP_INIT(ID_PLAYER_MOMENTUM)
|
||||
}
|
||||
|
||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||||
{
|
||||
if (!isLocal()) return;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_MOMENTUM about LocalPlayer from server");
|
||||
|
||||
if (!isRequest())
|
||||
{
|
||||
LocalPlayer &localPlayer = static_cast<LocalPlayer&>(*player);
|
||||
//localPlayer.setMomentum();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORPLAYERMOMENTUM_HPP
|
@ -0,0 +1,26 @@
|
||||
#ifndef OPENMW_PROCESSOROBJECTATTACH_HPP
|
||||
#define OPENMW_PROCESSOROBJECTATTACH_HPP
|
||||
|
||||
#include "BaseObjectProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorObjectAttach : public BaseObjectProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorObjectAttach()
|
||||
{
|
||||
BPP_INIT(ID_OBJECT_ATTACH)
|
||||
}
|
||||
|
||||
virtual void Do(WorldPacket &packet, WorldEvent &event)
|
||||
{
|
||||
BaseObjectProcessor::Do(packet, event);
|
||||
|
||||
//event.attachObjects(ptrCellStore);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSOROBJECTATTACH_HPP
|
@ -0,0 +1,26 @@
|
||||
#ifndef OPENMW_PROCESSOROBJECTCOLLISION_HPP
|
||||
#define OPENMW_PROCESSOROBJECTCOLLISION_HPP
|
||||
|
||||
#include "BaseObjectProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorObjectCollision : public BaseObjectProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorObjectCollision()
|
||||
{
|
||||
BPP_INIT(ID_OBJECT_COLLISION)
|
||||
}
|
||||
|
||||
virtual void Do(WorldPacket &packet, WorldEvent &event)
|
||||
{
|
||||
BaseObjectProcessor::Do(packet, event);
|
||||
|
||||
//event.setObjectCollisions(ptrCellStore);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSOROBJECTCOLLISION_HPP
|
@ -0,0 +1,16 @@
|
||||
#include "PacketPlayerMomentum.hpp"
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketPlayerMomentum::PacketPlayerMomentum(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
{
|
||||
packetID = ID_PLAYER_MOMENTUM;
|
||||
priority = MEDIUM_PRIORITY;
|
||||
}
|
||||
|
||||
void PacketPlayerMomentum::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
PlayerPacket::Packet(bs, send);
|
||||
// Placeholder
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETPLAYERMOMENTUM_HPP
|
||||
#define OPENMW_PACKETPLAYERMOMENTUM_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketPlayerMomentum : public PlayerPacket
|
||||
{
|
||||
public:
|
||||
PacketPlayerMomentum(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETPLAYERMOMENTUM_HPP
|
@ -0,0 +1,16 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include "PacketObjectAttach.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketObjectAttach::PacketObjectAttach(RakNet::RakPeerInterface *peer) : WorldPacket(peer)
|
||||
{
|
||||
packetID = ID_OBJECT_ATTACH;
|
||||
hasCellData = true;
|
||||
}
|
||||
|
||||
void PacketObjectAttach::Object(WorldObject &worldObject, bool send)
|
||||
{
|
||||
WorldPacket::Object(worldObject, send);
|
||||
// Placeholder
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETOBJECTATTACH_HPP
|
||||
#define OPENMW_PACKETOBJECTATTACH_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketObjectAttach : public WorldPacket
|
||||
{
|
||||
public:
|
||||
PacketObjectAttach(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Object(WorldObject &worldObject, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETOBJECTATTACH_HPP
|
@ -0,0 +1,16 @@
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include "PacketObjectCollision.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketObjectCollision::PacketObjectCollision(RakNet::RakPeerInterface *peer) : WorldPacket(peer)
|
||||
{
|
||||
packetID = ID_OBJECT_COLLISION;
|
||||
hasCellData = true;
|
||||
}
|
||||
|
||||
void PacketObjectCollision::Object(WorldObject &worldObject, bool send)
|
||||
{
|
||||
WorldPacket::Object(worldObject, send);
|
||||
// Placeholder
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETOBJECTCOLLISION_HPP
|
||||
#define OPENMW_PACKETOBJECTCOLLISION_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketObjectCollision : public WorldPacket
|
||||
{
|
||||
public:
|
||||
PacketObjectCollision(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Object(WorldObject &worldObject, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETOBJECTCOLLISION_HPP
|
Loading…
Reference in New Issue