forked from mirror/openmw-tes3mp
[General] Turn RecordDynamic into a Worldstate packet
This commit is contained in:
parent
031a80ed5a
commit
0be6de6607
11 changed files with 56 additions and 51 deletions
|
@ -123,23 +123,22 @@ source_group(tes3mp-server\\processors\\actor FILES ${PROCESSORS_ACTOR})
|
|||
|
||||
set(PROCESSORS_PLAYER
|
||||
processors/player/ProcessorChatMsg.hpp processors/player/ProcessorGUIMessageBox.hpp
|
||||
processors/player/ProcessorRecordDynamic.hpp processors/player/ProcessorGameWeather.hpp
|
||||
processors/player/ProcessorPlayerAnimFlags.hpp processors/player/ProcessorPlayerAnimPlay.hpp
|
||||
processors/player/ProcessorPlayerAttack.hpp processors/player/ProcessorPlayerAttribute.hpp
|
||||
processors/player/ProcessorPlayerBook.hpp processors/player/ProcessorPlayerBounty.hpp
|
||||
processors/player/ProcessorPlayerCellChange.hpp 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/ProcessorPlayerInventory.hpp
|
||||
processors/player/ProcessorPlayerJournal.hpp processors/player/ProcessorPlayerKillCount.hpp
|
||||
processors/player/ProcessorPlayerLevel.hpp processors/player/ProcessorPlayerMap.hpp
|
||||
processors/player/ProcessorPlayerMiscellaneous.hpp processors/player/ProcessorPlayerPosition.hpp
|
||||
processors/player/ProcessorPlayerQuickKeys.hpp processors/player/ProcessorPlayerRest.hpp
|
||||
processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerShapeshift.hpp
|
||||
processors/player/ProcessorPlayerSkill.hpp processors/player/ProcessorPlayerSpeech.hpp
|
||||
processors/player/ProcessorPlayerSpellbook.hpp processors/player/ProcessorPlayerStatsDynamic.hpp
|
||||
processors/player/ProcessorPlayerTopic.hpp
|
||||
processors/player/ProcessorGameWeather.hpp processors/player/ProcessorPlayerAnimFlags.hpp
|
||||
processors/player/ProcessorPlayerAnimPlay.hpp processors/player/ProcessorPlayerAttack.hpp
|
||||
processors/player/ProcessorPlayerAttribute.hpp processors/player/ProcessorPlayerBook.hpp
|
||||
processors/player/ProcessorPlayerBounty.hpp processors/player/ProcessorPlayerCellChange.hpp
|
||||
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/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerJournal.hpp
|
||||
processors/player/ProcessorPlayerKillCount.hpp processors/player/ProcessorPlayerLevel.hpp
|
||||
processors/player/ProcessorPlayerMap.hpp processors/player/ProcessorPlayerMiscellaneous.hpp
|
||||
processors/player/ProcessorPlayerPosition.hpp processors/player/ProcessorPlayerQuickKeys.hpp
|
||||
processors/player/ProcessorPlayerRest.hpp processors/player/ProcessorPlayerResurrect.hpp
|
||||
processors/player/ProcessorPlayerShapeshift.hpp processors/player/ProcessorPlayerSkill.hpp
|
||||
processors/player/ProcessorPlayerSpeech.hpp processors/player/ProcessorPlayerSpellbook.hpp
|
||||
processors/player/ProcessorPlayerStatsDynamic.hpp processors/player/ProcessorPlayerTopic.hpp
|
||||
)
|
||||
|
||||
source_group(tes3mp-server\\processors\\player FILES ${PROCESSORS_PLAYER})
|
||||
|
@ -159,6 +158,12 @@ set(PROCESSORS_OBJECT
|
|||
|
||||
source_group(tes3mp-server\\processors\\object FILES ${PROCESSORS_OBJECT})
|
||||
|
||||
set(PROCESSORS_WORLDSTATE
|
||||
processors/worldstate/ProcessorRecordDynamic.hpp
|
||||
)
|
||||
|
||||
source_group(tes3mp-server\\processors\\worldstate FILES ${PROCESSORS_WORLDSTATE})
|
||||
|
||||
set(PROCESSORS
|
||||
processors/ProcessorInitializer.cpp
|
||||
processors/PlayerProcessor.cpp
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
//
|
||||
// Created by koncord on 31.03.17.
|
||||
//
|
||||
|
||||
#include "ProcessorInitializer.hpp"
|
||||
|
||||
#include "Networking.hpp"
|
||||
|
@ -11,7 +7,6 @@
|
|||
#include "player/ProcessorChatMsg.hpp"
|
||||
#include "player/ProcessorGUIMessageBox.hpp"
|
||||
#include "player/ProcessorGameWeather.hpp"
|
||||
#include "player/ProcessorRecordDynamic.hpp"
|
||||
#include "player/ProcessorPlayerCharGen.hpp"
|
||||
#include "player/ProcessorPlayerAnimFlags.hpp"
|
||||
#include "player/ProcessorPlayerAnimPlay.hpp"
|
||||
|
@ -79,7 +74,8 @@
|
|||
#include "object/ProcessorScriptGlobalShort.hpp"
|
||||
#include "object/ProcessorScriptGlobalFloat.hpp"
|
||||
#include "object/ProcessorVideoPlay.hpp"
|
||||
|
||||
#include "WorldstateProcessor.hpp"
|
||||
#include "worldstate/ProcessorRecordDynamic.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
|
@ -88,7 +84,6 @@ void ProcessorInitializer()
|
|||
PlayerProcessor::AddProcessor(new ProcessorChatMsg());
|
||||
PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox());
|
||||
PlayerProcessor::AddProcessor(new ProcessorGameWeather());
|
||||
PlayerProcessor::AddProcessor(new ProcessorRecordDynamic());
|
||||
PlayerProcessor::AddProcessor(new ProcessorPlayerCharGen());
|
||||
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags());
|
||||
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimPlay());
|
||||
|
@ -156,4 +151,6 @@ void ProcessorInitializer()
|
|||
ObjectProcessor::AddProcessor(new ProcessorScriptGlobalShort());
|
||||
ObjectProcessor::AddProcessor(new ProcessorScriptGlobalFloat());
|
||||
ObjectProcessor::AddProcessor(new ProcessorVideoPlay());
|
||||
|
||||
WorldstateProcessor::AddProcessor(new ProcessorRecordDynamic());
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef OPENMW_PROCESSORRECORDDYNAMIC_HPP
|
||||
#define OPENMW_PROCESSORRECORDDYNAMIC_HPP
|
||||
|
||||
#include "../PlayerProcessor.hpp"
|
||||
#include "../WorldstateProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorRecordDynamic : public PlayerProcessor
|
||||
class ProcessorRecordDynamic : public WorldstateProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorRecordDynamic()
|
||||
|
@ -13,7 +13,7 @@ namespace mwmp
|
|||
BPP_INIT(ID_RECORD_DYNAMIC)
|
||||
}
|
||||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
void Do(WorldstatePacket &packet, Player &player, BaseWorldstate &worldstate) override
|
||||
{
|
||||
DEBUG_PRINTF(strPacketID.c_str());
|
||||
|
|
@ -114,15 +114,14 @@ add_openmw_dir (mwmp/processors/actor ProcessorActorAI ProcessorActorAnimFlags P
|
|||
)
|
||||
|
||||
add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageBox ProcessorHandshake
|
||||
ProcessorUserDisconnected ProcessorUserMyID ProcessorCellCreate ProcessorRecordDynamic ProcessorGameSettings
|
||||
ProcessorGameWeather ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute
|
||||
ProcessorPlayerBaseInfo ProcessorPlayerBehavior ProcessorPlayerBook ProcessorPlayerBounty ProcessorPlayerCellChange
|
||||
ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerDisposition
|
||||
ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInteraction ProcessorPlayerInventory ProcessorPlayerJail
|
||||
ProcessorPlayerJournal ProcessorPlayerKillCount ProcessorPlayerLevel ProcessorPlayerMap ProcessorPlayerMiscellaneous
|
||||
ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys ProcessorPlayerReputation ProcessorPlayerResurrect
|
||||
ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic
|
||||
ProcessorPlayerTopic
|
||||
ProcessorUserDisconnected ProcessorUserMyID ProcessorCellCreate ProcessorGameSettings ProcessorGameWeather
|
||||
ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBaseInfo
|
||||
ProcessorPlayerBehavior ProcessorPlayerBook ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState
|
||||
ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment
|
||||
ProcessorPlayerFaction ProcessorPlayerInteraction ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal
|
||||
ProcessorPlayerKillCount ProcessorPlayerLevel ProcessorPlayerMap ProcessorPlayerMiscellaneous ProcessorPlayerMomentum
|
||||
ProcessorPlayerPosition ProcessorPlayerQuickKeys ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift
|
||||
ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic
|
||||
)
|
||||
|
||||
add_openmw_dir (mwmp/processors/object BaseObjectProcessor ProcessorConsoleCommand ProcessorContainer ProcessorDoorDestination
|
||||
|
@ -133,7 +132,7 @@ add_openmw_dir (mwmp/processors/object BaseObjectProcessor ProcessorConsoleComma
|
|||
ProcessorScriptMemberFloat ProcessorScriptGlobalShort ProcessorScriptGlobalFloat
|
||||
)
|
||||
|
||||
add_openmw_dir (mwmp/processors/worldstate ProcessorWorldTime
|
||||
add_openmw_dir (mwmp/processors/worldstate ProcessorRecordDynamic ProcessorWorldTime
|
||||
)
|
||||
|
||||
# Main executable
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "player/ProcessorHandshake.hpp"
|
||||
#include "player/ProcessorUserDisconnected.hpp"
|
||||
#include "player/ProcessorCellCreate.hpp"
|
||||
#include "player/ProcessorRecordDynamic.hpp"
|
||||
#include "player/ProcessorGameSettings.hpp"
|
||||
#include "player/ProcessorGameWeather.hpp"
|
||||
#include "player/ProcessorPlayerAnimFlags.hpp"
|
||||
|
@ -91,6 +90,7 @@
|
|||
#include "actor/ProcessorActorTest.hpp"
|
||||
|
||||
#include "WorldstateProcessor.hpp"
|
||||
#include "worldstate/ProcessorRecordDynamic.hpp"
|
||||
#include "worldstate/ProcessorWorldTime.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
@ -102,7 +102,6 @@ void ProcessorInitializer()
|
|||
PlayerProcessor::AddProcessor(new ProcessorHandshake());
|
||||
PlayerProcessor::AddProcessor(new ProcessorUserDisconnected());
|
||||
PlayerProcessor::AddProcessor(new ProcessorCellCreate());
|
||||
PlayerProcessor::AddProcessor(new ProcessorRecordDynamic());
|
||||
PlayerProcessor::AddProcessor(new ProcessorGameSettings());
|
||||
PlayerProcessor::AddProcessor(new ProcessorGameWeather());
|
||||
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags());
|
||||
|
@ -184,5 +183,6 @@ void ProcessorInitializer()
|
|||
ActorProcessor::AddProcessor(new ProcessorActorStatsDynamic());
|
||||
ActorProcessor::AddProcessor(new ProcessorActorTest());
|
||||
|
||||
WorldstateProcessor::AddProcessor(new ProcessorRecordDynamic());
|
||||
WorldstateProcessor::AddProcessor(new ProcessorWorldTime());
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef OPENMW_PROCESSORRECORDDYNAMIC_HPP
|
||||
#define OPENMW_PROCESSORRECORDDYNAMIC_HPP
|
||||
|
||||
#include "../PlayerProcessor.hpp"
|
||||
#include "../WorldstateProcessor.hpp"
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class ProcessorRecordDynamic : public PlayerProcessor
|
||||
class ProcessorRecordDynamic : public WorldstateProcessor
|
||||
{
|
||||
public:
|
||||
ProcessorRecordDynamic()
|
||||
|
@ -13,7 +13,7 @@ namespace mwmp
|
|||
BPP_INIT(ID_RECORD_DYNAMIC)
|
||||
}
|
||||
|
||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||||
virtual void Do(WorldstatePacket &packet, BaseWorldstate &worldstate)
|
||||
{
|
||||
// Placeholder
|
||||
}
|
|
@ -167,6 +167,7 @@ add_component_dir (openmw-mp/Packets
|
|||
|
||||
add_component_dir (openmw-mp/Packets/Actor
|
||||
ActorPacket
|
||||
|
||||
PacketActorList PacketActorAuthority PacketActorTest PacketActorAI PacketActorAnimFlags PacketActorAnimPlay
|
||||
PacketActorAttack PacketActorCellChange PacketActorDeath PacketActorEquipment PacketActorInteraction PacketActorPosition
|
||||
PacketActorSpeech PacketActorStatsDynamic
|
||||
|
@ -174,9 +175,10 @@ add_component_dir (openmw-mp/Packets/Actor
|
|||
|
||||
add_component_dir (openmw-mp/Packets/Player
|
||||
PlayerPacket
|
||||
|
||||
PacketHandshake PacketChatMessage PacketGUIBoxes PacketGameSettings PacketGameWeather
|
||||
|
||||
PacketCellCreate PacketRecordDynamic
|
||||
PacketCellCreate
|
||||
|
||||
PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay
|
||||
PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty
|
||||
|
@ -189,6 +191,7 @@ add_component_dir (openmw-mp/Packets/Player
|
|||
|
||||
add_component_dir (openmw-mp/Packets/Object
|
||||
ObjectPacket
|
||||
|
||||
PacketConsoleCommand PacketContainer PacketObjectAnimPlay PacketObjectAttach PacketObjectCollision
|
||||
PacketObjectDelete PacketDoorDestination PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace
|
||||
PacketObjectReset PacketObjectRotate PacketObjectScale PacketObjectSpawn PacketObjectState PacketObjectTrap
|
||||
|
@ -198,7 +201,8 @@ add_component_dir (openmw-mp/Packets/Object
|
|||
|
||||
add_component_dir (openmw-mp/Packets/Worldstate
|
||||
WorldstatePacket
|
||||
PacketWorldTime
|
||||
|
||||
PacketRecordDynamic PacketWorldTime
|
||||
)
|
||||
|
||||
add_component_dir (fallback
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "../Packets/Player/PacketGUIBoxes.hpp"
|
||||
#include "../Packets/Player/PacketLoaded.hpp"
|
||||
#include "../Packets/Player/PacketCellCreate.hpp"
|
||||
#include "../Packets/Player/PacketRecordDynamic.hpp"
|
||||
#include "../Packets/Player/PacketGameSettings.hpp"
|
||||
#include "../Packets/Player/PacketGameWeather.hpp"
|
||||
#include "../Packets/Player/PacketPlayerActiveSkills.hpp"
|
||||
|
@ -63,7 +62,6 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
|
|||
AddPacket<PacketGUIBoxes>(&packets, peer);
|
||||
AddPacket<PacketLoaded>(&packets, peer);
|
||||
AddPacket<PacketCellCreate>(&packets, peer);
|
||||
AddPacket<PacketRecordDynamic>(&packets, peer);
|
||||
AddPacket<PacketGameSettings>(&packets, peer);
|
||||
AddPacket<PacketGameWeather>(&packets, peer);
|
||||
AddPacket<PacketPlayerActiveSkills>(&packets, peer);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "../Packets/Worldstate/PacketRecordDynamic.hpp"
|
||||
#include "../Packets/Worldstate/PacketWorldTime.hpp"
|
||||
|
||||
#include "WorldstatePacketController.hpp"
|
||||
|
@ -12,6 +13,7 @@ inline void AddPacket(mwmp::WorldstatePacketController::packets_t *packets, RakN
|
|||
|
||||
mwmp::WorldstatePacketController::WorldstatePacketController(RakNet::RakPeerInterface *peer)
|
||||
{
|
||||
AddPacket<PacketRecordDynamic>(&packets, peer);
|
||||
AddPacket<PacketWorldTime>(&packets, peer);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketRecordDynamic::PacketRecordDynamic(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
PacketRecordDynamic::PacketRecordDynamic(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer)
|
||||
{
|
||||
packetID = ID_RECORD_DYNAMIC;
|
||||
orderChannel = CHANNEL_SYSTEM;
|
||||
orderChannel = CHANNEL_WORLDSTATE;
|
||||
}
|
||||
|
||||
void PacketRecordDynamic::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
PlayerPacket::Packet(bs, send);
|
||||
WorldstatePacket::Packet(bs, send);
|
||||
|
||||
// Placeholder
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef OPENMW_PACKETRECORDDYNAMIC_HPP
|
||||
#define OPENMW_PACKETRECORDDYNAMIC_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
#include <components/openmw-mp/Packets/Worldstate/WorldstatePacket.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketRecordDynamic: public PlayerPacket
|
||||
class PacketRecordDynamic: public WorldstatePacket
|
||||
{
|
||||
public:
|
||||
PacketRecordDynamic(RakNet::RakPeerInterface *peer);
|
Loading…
Reference in a new issue