[General] Add placeholders for new packet types, part 2

sol2-server-rewrite
David Cernat 7 years ago
parent 273a1f50af
commit 3d80e2db62

@ -119,16 +119,17 @@ add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageB
ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath
ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInteraction ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInteraction
ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorPlayerKillCount ProcessorPlayerLevel ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorPlayerKillCount ProcessorPlayerLevel
ProcessorPlayerMap ProcessorPlayerMiscellaneous ProcessorPlayerPosition ProcessorPlayerQuickKeys ProcessorPlayerMap ProcessorPlayerMiscellaneous ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys
ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech
ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic
) )
add_openmw_dir (mwmp/processors/world BaseObjectProcessor ProcessorConsoleCommand ProcessorContainer ProcessorDoorState add_openmw_dir (mwmp/processors/world BaseObjectProcessor ProcessorConsoleCommand ProcessorContainer ProcessorDoorState
ProcessorMusicPlay ProcessorVideoPlay ProcessorObjectAnimPlay ProcessorObjectDelete ProcessorObjectLock ProcessorMusicPlay ProcessorVideoPlay ProcessorObjectAnimPlay ProcessorObjectAttach ProcessorObjectCollision
ProcessorObjectMove ProcessorObjectPlace ProcessorObjectReset ProcessorObjectRotate ProcessorObjectScale ProcessorObjectDelete ProcessorObjectLock ProcessorObjectMove ProcessorObjectPlace ProcessorObjectReset
ProcessorObjectSpawn ProcessorObjectState ProcessorObjectTrap ProcessorScriptLocalShort ProcessorScriptLocalFloat ProcessorObjectRotate ProcessorObjectScale ProcessorObjectSpawn ProcessorObjectState ProcessorObjectTrap
ProcessorScriptMemberShort ProcessorScriptMemberFloat ProcessorScriptGlobalShort ProcessorScriptGlobalFloat ProcessorScriptLocalShort ProcessorScriptLocalFloat ProcessorScriptMemberShort ProcessorScriptMemberFloat
ProcessorScriptGlobalShort ProcessorScriptGlobalFloat
) )
# Main executable # Main executable

@ -39,6 +39,7 @@
#include "player/ProcessorPlayerLevel.hpp" #include "player/ProcessorPlayerLevel.hpp"
#include "player/ProcessorPlayerMap.hpp" #include "player/ProcessorPlayerMap.hpp"
#include "player/ProcessorPlayerMiscellaneous.hpp" #include "player/ProcessorPlayerMiscellaneous.hpp"
#include "player/ProcessorPlayerMomentum.hpp"
#include "player/ProcessorPlayerPosition.hpp" #include "player/ProcessorPlayerPosition.hpp"
#include "player/ProcessorPlayerQuickKeys.hpp" #include "player/ProcessorPlayerQuickKeys.hpp"
#include "player/ProcessorPlayerRegionAuthority.hpp" #include "player/ProcessorPlayerRegionAuthority.hpp"
@ -59,6 +60,8 @@
#include "world/ProcessorDoorState.hpp" #include "world/ProcessorDoorState.hpp"
#include "world/ProcessorMusicPlay.hpp" #include "world/ProcessorMusicPlay.hpp"
#include "world/ProcessorObjectAnimPlay.hpp" #include "world/ProcessorObjectAnimPlay.hpp"
#include "world/ProcessorObjectAttach.hpp"
#include "world/ProcessorObjectCollision.hpp"
#include "world/ProcessorObjectDelete.hpp" #include "world/ProcessorObjectDelete.hpp"
#include "world/ProcessorObjectLock.hpp" #include "world/ProcessorObjectLock.hpp"
#include "world/ProcessorObjectMove.hpp" #include "world/ProcessorObjectMove.hpp"
@ -129,6 +132,7 @@ void ProcessorInitializer()
PlayerProcessor::AddProcessor(new ProcessorPlayerLevel()); PlayerProcessor::AddProcessor(new ProcessorPlayerLevel());
PlayerProcessor::AddProcessor(new ProcessorPlayerMap()); PlayerProcessor::AddProcessor(new ProcessorPlayerMap());
PlayerProcessor::AddProcessor(new ProcessorPlayerMiscellaneous()); PlayerProcessor::AddProcessor(new ProcessorPlayerMiscellaneous());
PlayerProcessor::AddProcessor(new ProcessorPlayerMomentum());
PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); PlayerProcessor::AddProcessor(new ProcessorPlayerPosition());
PlayerProcessor::AddProcessor(new ProcessorPlayerQuickKeys()); PlayerProcessor::AddProcessor(new ProcessorPlayerQuickKeys());
PlayerProcessor::AddProcessor(new ProcessorPlayerRegionAuthority()); PlayerProcessor::AddProcessor(new ProcessorPlayerRegionAuthority());
@ -148,6 +152,8 @@ void ProcessorInitializer()
WorldProcessor::AddProcessor(new ProcessorDoorState()); WorldProcessor::AddProcessor(new ProcessorDoorState());
WorldProcessor::AddProcessor(new ProcessorMusicPlay()); WorldProcessor::AddProcessor(new ProcessorMusicPlay());
WorldProcessor::AddProcessor(new ProcessorObjectAnimPlay()); WorldProcessor::AddProcessor(new ProcessorObjectAnimPlay());
WorldProcessor::AddProcessor(new ProcessorObjectAttach());
WorldProcessor::AddProcessor(new ProcessorObjectCollision());
WorldProcessor::AddProcessor(new ProcessorObjectDelete()); WorldProcessor::AddProcessor(new ProcessorObjectDelete());
WorldProcessor::AddProcessor(new ProcessorObjectLock()); WorldProcessor::AddProcessor(new ProcessorObjectLock());
WorldProcessor::AddProcessor(new ProcessorObjectMove()); WorldProcessor::AddProcessor(new ProcessorObjectMove());

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

@ -187,21 +187,21 @@ add_component_dir (openmw-mp/Packets/Player
PacketCellCreate PacketRecordDynamic PacketCellCreate PacketRecordDynamic
PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay
PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty PacketPlayerCellChange PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty
PacketPlayerCellState PacketPlayerClass PacketPlayerDeath PacketPlayerEquipment PacketPlayerFaction PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass PacketPlayerDeath PacketPlayerEquipment
PacketPlayerInteraction PacketPlayerInventory PacketPlayerJail PacketPlayerJournal PacketPlayerKillCount PacketPlayerLevel PacketPlayerFaction PacketPlayerInteraction PacketPlayerInventory PacketPlayerJail PacketPlayerJournal
PacketPlayerMap PacketPlayerMiscellaneous PacketPlayerPosition PacketPlayerQuickKeys PacketPlayerRegionAuthority PacketPlayerKillCount PacketPlayerLevel PacketPlayerMap PacketPlayerMiscellaneous PacketPlayerMomentum
PacketPlayerReputation PacketPlayerRest PacketPlayerResurrect PacketPlayerShapeshift PacketPlayerSkill PacketPlayerSpeech PacketPlayerPosition PacketPlayerQuickKeys PacketPlayerRegionAuthority PacketPlayerReputation PacketPlayerRest
PacketPlayerSpellbook PacketPlayerStatsDynamic PacketPlayerTopic PacketPlayerResurrect PacketPlayerShapeshift PacketPlayerSkill PacketPlayerSpeech PacketPlayerSpellbook PacketPlayerStatsDynamic PacketPlayerTopic
) )
add_component_dir (openmw-mp/Packets/World add_component_dir (openmw-mp/Packets/World
WorldPacket WorldPacket
PacketConsoleCommand PacketContainer PacketObjectAnimPlay PacketObjectDelete PacketDoorDestination PacketConsoleCommand PacketContainer PacketObjectAnimPlay PacketObjectAttach PacketObjectCollision
PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace PacketObjectReset PacketObjectRotate PacketObjectDelete PacketDoorDestination PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace
PacketObjectScale PacketObjectSpawn PacketObjectState PacketObjectTrap PacketMusicPlay PacketVideoPlay PacketObjectReset PacketObjectRotate PacketObjectScale PacketObjectSpawn PacketObjectState PacketObjectTrap
PacketScriptLocalShort PacketScriptLocalFloat PacketScriptMemberShort PacketScriptMemberFloat PacketScriptGlobalShort PacketMusicPlay PacketVideoPlay PacketScriptLocalShort PacketScriptLocalFloat PacketScriptMemberShort
PacketScriptGlobalFloat PacketScriptMemberFloat PacketScriptGlobalShort PacketScriptGlobalFloat
) )
add_component_dir (fallback add_component_dir (fallback

@ -32,6 +32,7 @@
#include "../Packets/Player/PacketPlayerLevel.hpp" #include "../Packets/Player/PacketPlayerLevel.hpp"
#include "../Packets/Player/PacketPlayerMap.hpp" #include "../Packets/Player/PacketPlayerMap.hpp"
#include "../Packets/Player/PacketPlayerMiscellaneous.hpp" #include "../Packets/Player/PacketPlayerMiscellaneous.hpp"
#include "../Packets/Player/PacketPlayerMomentum.hpp"
#include "../Packets/Player/PacketPlayerPosition.hpp" #include "../Packets/Player/PacketPlayerPosition.hpp"
#include "../Packets/Player/PacketPlayerQuickKeys.hpp" #include "../Packets/Player/PacketPlayerQuickKeys.hpp"
#include "../Packets/Player/PacketPlayerRegionAuthority.hpp" #include "../Packets/Player/PacketPlayerRegionAuthority.hpp"
@ -92,6 +93,7 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
AddPacket<PacketPlayerLevel>(&packets, peer); AddPacket<PacketPlayerLevel>(&packets, peer);
AddPacket<PacketPlayerMap>(&packets, peer); AddPacket<PacketPlayerMap>(&packets, peer);
AddPacket<PacketPlayerMiscellaneous>(&packets, peer); AddPacket<PacketPlayerMiscellaneous>(&packets, peer);
AddPacket<PacketPlayerMomentum>(&packets, peer);
AddPacket<PacketPlayerPosition>(&packets, peer); AddPacket<PacketPlayerPosition>(&packets, peer);
AddPacket<PacketPlayerQuickKeys>(&packets, peer); AddPacket<PacketPlayerQuickKeys>(&packets, peer);
AddPacket<PacketPlayerRegionAuthority>(&packets, peer); AddPacket<PacketPlayerRegionAuthority>(&packets, peer);

@ -1,4 +1,6 @@
#include "../Packets/World/PacketObjectAnimPlay.hpp" #include "../Packets/World/PacketObjectAnimPlay.hpp"
#include "../Packets/World/PacketObjectAttach.hpp"
#include "../Packets/World/PacketObjectCollision.hpp"
#include "../Packets/World/PacketObjectDelete.hpp" #include "../Packets/World/PacketObjectDelete.hpp"
#include "../Packets/World/PacketObjectLock.hpp" #include "../Packets/World/PacketObjectLock.hpp"
#include "../Packets/World/PacketObjectMove.hpp" #include "../Packets/World/PacketObjectMove.hpp"
@ -37,6 +39,8 @@ inline void AddPacket(mwmp::WorldPacketController::packets_t *packets, RakNet::R
mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *peer) mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *peer)
{ {
AddPacket<PacketObjectAnimPlay>(&packets, peer); AddPacket<PacketObjectAnimPlay>(&packets, peer);
AddPacket<PacketObjectAttach>(&packets, peer);
AddPacket<PacketObjectCollision>(&packets, peer);
AddPacket<PacketObjectDelete>(&packets, peer); AddPacket<PacketObjectDelete>(&packets, peer);
AddPacket<PacketObjectLock>(&packets, peer); AddPacket<PacketObjectLock>(&packets, peer);
AddPacket<PacketObjectMove>(&packets, peer); AddPacket<PacketObjectMove>(&packets, peer);

@ -46,6 +46,7 @@ enum GameMessages
ID_PLAYER_LEVEL, ID_PLAYER_LEVEL,
ID_PLAYER_MAP, ID_PLAYER_MAP,
ID_PLAYER_MISCELLANEOUS, ID_PLAYER_MISCELLANEOUS,
ID_PLAYER_MOMENTUM,
ID_PLAYER_POSITION, ID_PLAYER_POSITION,
ID_PLAYER_QUICKKEYS, ID_PLAYER_QUICKKEYS,
ID_PLAYER_REGION_AUTHORITY, ID_PLAYER_REGION_AUTHORITY,
@ -75,6 +76,8 @@ enum GameMessages
ID_ACTOR_STATS_DYNAMIC, ID_ACTOR_STATS_DYNAMIC,
ID_OBJECT_ANIM_PLAY, ID_OBJECT_ANIM_PLAY,
ID_OBJECT_ATTACH,
ID_OBJECT_COLLISION,
ID_OBJECT_DELETE, ID_OBJECT_DELETE,
ID_OBJECT_LOCK, ID_OBJECT_LOCK,
ID_OBJECT_MOVE, ID_OBJECT_MOVE,

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