[General] Turn PlayerInteraction into PlayerInput

remotes/1728160796594174844/tmp_0.7.0-alpha
David Cernat 7 years ago
parent 32b6134fad
commit 61da0d2475

@ -105,7 +105,7 @@ set(PROCESSORS_PLAYER
processors/player/ProcessorPlayerCellState.hpp processors/player/ProcessorPlayerCharClass.hpp
processors/player/ProcessorPlayerCharGen.hpp processors/player/ProcessorPlayerDeath.hpp
processors/player/ProcessorPlayerDisposition.hpp processors/player/ProcessorPlayerEquipment.hpp
processors/player/ProcessorPlayerFaction.hpp processors/player/ProcessorPlayerInteraction.hpp
processors/player/ProcessorPlayerFaction.hpp processors/player/ProcessorPlayerInput.hpp
processors/player/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerJournal.hpp
processors/player/ProcessorPlayerKillCount.hpp processors/player/ProcessorPlayerLevel.hpp
processors/player/ProcessorPlayerMiscellaneous.hpp processors/player/ProcessorPlayerPosition.hpp

@ -174,7 +174,7 @@ public:
{"OnPlayerDisposition", Function<void, unsigned short>()},
{"OnPlayerBook", Function<void, unsigned short>()},
{"OnPlayerMiscellaneous", Function<void, unsigned short>()},
{"OnPlayerInteraction", Function<void, unsigned short>()},
{"OnPlayerInput", Function<void, unsigned short>()},
{"OnPlayerRest", Function<void, unsigned short>()},
{"OnRecordDynamic", Function<void, unsigned short>()},
{"OnCellLoad", Function<void, unsigned short, const char*>()},

@ -24,7 +24,7 @@
#include "player/ProcessorPlayerInventory.hpp"
#include "player/ProcessorPlayerJournal.hpp"
#include "player/ProcessorPlayerKillCount.hpp"
#include "player/ProcessorPlayerInteraction.hpp"
#include "player/ProcessorPlayerInput.hpp"
#include "player/ProcessorPlayerLevel.hpp"
#include "player/ProcessorPlayerMiscellaneous.hpp"
#include "player/ProcessorPlayerPosition.hpp"
@ -101,7 +101,7 @@ void ProcessorInitializer()
PlayerProcessor::AddProcessor(new ProcessorPlayerInventory());
PlayerProcessor::AddProcessor(new ProcessorPlayerJournal());
PlayerProcessor::AddProcessor(new ProcessorPlayerKillCount());
PlayerProcessor::AddProcessor(new ProcessorPlayerInteraction());
PlayerProcessor::AddProcessor(new ProcessorPlayerInput());
PlayerProcessor::AddProcessor(new ProcessorPlayerLevel());
PlayerProcessor::AddProcessor(new ProcessorPlayerMiscellaneous());
PlayerProcessor::AddProcessor(new ProcessorPlayerPosition());

@ -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

@ -116,7 +116,7 @@ add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageB
ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBaseInfo ProcessorPlayerBehavior
ProcessorPlayerBook ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass
ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction
ProcessorPlayerInteraction ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorPlayerKillCount
ProcessorPlayerInput ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorPlayerKillCount
ProcessorPlayerLevel ProcessorPlayerMiscellaneous ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys
ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech
ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic

@ -23,7 +23,7 @@
#include "player/ProcessorPlayerDisposition.hpp"
#include "player/ProcessorPlayerEquipment.hpp"
#include "player/ProcessorPlayerFaction.hpp"
#include "player/ProcessorPlayerInteraction.hpp"
#include "player/ProcessorPlayerInput.hpp"
#include "player/ProcessorPlayerInventory.hpp"
#include "player/ProcessorPlayerJail.hpp"
#include "player/ProcessorPlayerJournal.hpp"
@ -121,7 +121,7 @@ void ProcessorInitializer()
PlayerProcessor::AddProcessor(new ProcessorPlayerDisposition());
PlayerProcessor::AddProcessor(new ProcessorPlayerEquipment());
PlayerProcessor::AddProcessor(new ProcessorPlayerFaction());
PlayerProcessor::AddProcessor(new ProcessorPlayerInteraction());
PlayerProcessor::AddProcessor(new ProcessorPlayerInput());
PlayerProcessor::AddProcessor(new ProcessorPlayerInventory());
PlayerProcessor::AddProcessor(new ProcessorPlayerJail());
PlayerProcessor::AddProcessor(new ProcessorPlayerJournal());

@ -1,5 +1,5 @@
#ifndef OPENMW_PROCESSORPLAYERINTERACTION_HPP
#define OPENMW_PROCESSORPLAYERINTERACTION_HPP
#ifndef OPENMW_PROCESSORPLAYERINPUT_HPP
#define OPENMW_PROCESSORPLAYERINPUT_HPP
#include "apps/openmw/mwmp/Main.hpp"
#include "../PlayerProcessor.hpp"
@ -7,12 +7,12 @@
namespace mwmp
{
class ProcessorPlayerInteraction : public PlayerProcessor
class ProcessorPlayerInput : public PlayerProcessor
{
public:
ProcessorPlayerInteraction()
ProcessorPlayerInput()
{
BPP_INIT(ID_PLAYER_INTERACTION)
BPP_INIT(ID_PLAYER_INPUT)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
@ -24,4 +24,4 @@ namespace mwmp
}
#endif //OPENMW_PROCESSORPLAYERINTERACTION_HPP
#endif //OPENMW_PROCESSORPLAYERINPUT_HPP

@ -181,7 +181,7 @@ add_component_dir (openmw-mp/Packets/Player
PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay
PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty
PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass PacketPlayerDeath PacketPlayerEquipment
PacketPlayerFaction PacketPlayerInteraction PacketPlayerInventory PacketPlayerJail PacketPlayerJournal
PacketPlayerFaction PacketPlayerInput PacketPlayerInventory PacketPlayerJail PacketPlayerJournal
PacketPlayerKillCount PacketPlayerLevel PacketPlayerMiscellaneous PacketPlayerMomentum PacketPlayerPosition
PacketPlayerQuickKeys PacketPlayerRegionAuthority PacketPlayerReputation PacketPlayerRest PacketPlayerResurrect
PacketPlayerShapeshift PacketPlayerSkill PacketPlayerSpeech PacketPlayerSpellbook PacketPlayerStatsDynamic

@ -21,7 +21,7 @@
#include "../Packets/Player/PacketPlayerDeath.hpp"
#include "../Packets/Player/PacketPlayerEquipment.hpp"
#include "../Packets/Player/PacketPlayerFaction.hpp"
#include "../Packets/Player/PacketPlayerInteraction.hpp"
#include "../Packets/Player/PacketPlayerInput.hpp"
#include "../Packets/Player/PacketPlayerInventory.hpp"
#include "../Packets/Player/PacketPlayerJail.hpp"
#include "../Packets/Player/PacketPlayerJournal.hpp"
@ -78,7 +78,7 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
AddPacket<PacketPlayerDeath>(&packets, peer);
AddPacket<PacketPlayerEquipment>(&packets, peer);
AddPacket<PacketPlayerFaction>(&packets, peer);
AddPacket<PacketPlayerInteraction>(&packets, peer);
AddPacket<PacketPlayerInput>(&packets, peer);
AddPacket<PacketPlayerInventory>(&packets, peer);
AddPacket<PacketPlayerJail>(&packets, peer);
AddPacket<PacketPlayerJournal>(&packets, peer);

@ -37,7 +37,7 @@ enum GameMessages
ID_PLAYER_DISPOSITION,
ID_PLAYER_EQUIPMENT,
ID_PLAYER_FACTION,
ID_PLAYER_INTERACTION,
ID_PLAYER_INPUT,
ID_PLAYER_INVENTORY,
ID_PLAYER_JAIL,
ID_PLAYER_JOURNAL,

@ -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…
Cancel
Save