forked from teamnwah/openmw-tes3coop
[General] Turn PlayerInteraction into PlayerInput
parent
32b6134fad
commit
61da0d2475
@ -0,0 +1,25 @@
|
||||
#ifndef OPENMW_PROCESSORPLAYERINPUT_HPP
|
||||
#define OPENMW_PROCESSORPLAYERINPUT_HPP
|
||||
|
||||
#include "../PlayerProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorPlayerInput : public PlayerProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorPlayerInput()
|
||||
{
|
||||
BPP_INIT(ID_PLAYER_INPUT)
|
||||
}
|
||||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
{
|
||||
DEBUG_PRINTF(strPacketID.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnPlayerInput")>(player.getId());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORPLAYERINPUT_HPP
|
@ -1,25 +0,0 @@
|
||||
#ifndef OPENMW_PROCESSORPLAYERINTERACTION_HPP
|
||||
#define OPENMW_PROCESSORPLAYERINTERACTION_HPP
|
||||
|
||||
#include "../PlayerProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorPlayerInteraction : public PlayerProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorPlayerInteraction()
|
||||
{
|
||||
BPP_INIT(ID_PLAYER_INTERACTION)
|
||||
}
|
||||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
{
|
||||
DEBUG_PRINTF(strPacketID.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnPlayerInteraction")>(player.getId());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PROCESSORPLAYERINTERACTION_HPP
|
@ -0,0 +1,16 @@
|
||||
#include "PacketPlayerInput.hpp"
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketPlayerInput::PacketPlayerInput(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
{
|
||||
packetID = ID_PLAYER_INPUT;
|
||||
}
|
||||
|
||||
void PacketPlayerInput::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
PlayerPacket::Packet(bs, send);
|
||||
|
||||
// Placeholder
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#ifndef OPENMW_PACKETPLAYERINPUT_HPP
|
||||
#define OPENMW_PACKETPLAYERINPUT_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketPlayerInput : public PlayerPacket
|
||||
{
|
||||
public:
|
||||
PacketPlayerInput(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETPLAYERINPUT_HPP
|
@ -1,16 +0,0 @@
|
||||
#include "PacketPlayerInteraction.hpp"
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketPlayerInteraction::PacketPlayerInteraction(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
{
|
||||
packetID = ID_PLAYER_INTERACTION;
|
||||
}
|
||||
|
||||
void PacketPlayerInteraction::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
PlayerPacket::Packet(bs, send);
|
||||
|
||||
// Placeholder
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#ifndef OPENMW_PACKETPLAYERINTERACTION_HPP
|
||||
#define OPENMW_PACKETPLAYERINTERACTION_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketPlayerInteraction : public PlayerPacket
|
||||
{
|
||||
public:
|
||||
PacketPlayerInteraction(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETPLAYERINTERACTION_HPP
|
Loading…
Reference in New Issue