[General] Turn CellCreate into a Worldstate packet

remotes/1728160796594174844/tmp_0.7.0-alpha
David Cernat 7 years ago
parent ae55ee7f0b
commit a471f5e452

@ -112,15 +112,14 @@ add_openmw_dir (mwmp/processors/actor ProcessorActorAI ProcessorActorAnimFlags P
)
add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageBox ProcessorHandshake
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 ProcessorPlayerMiscellaneous ProcessorPlayerMomentum
ProcessorPlayerPosition ProcessorPlayerQuickKeys ProcessorPlayerReputation ProcessorPlayerResurrect
ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic
ProcessorPlayerTopic
ProcessorUserDisconnected ProcessorUserMyID ProcessorGameSettings ProcessorGameWeather ProcessorPlayerAnimFlags
ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBaseInfo ProcessorPlayerBehavior
ProcessorPlayerBook ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass
ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction
ProcessorPlayerInteraction ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorPlayerKillCount
ProcessorPlayerLevel ProcessorPlayerMiscellaneous ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys
ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech
ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic
)
add_openmw_dir (mwmp/processors/object BaseObjectProcessor ProcessorConsoleCommand ProcessorContainer
@ -131,8 +130,8 @@ add_openmw_dir (mwmp/processors/object BaseObjectProcessor ProcessorConsoleComma
ProcessorScriptMemberShort ProcessorScriptMemberFloat ProcessorScriptGlobalShort ProcessorScriptGlobalFloat
)
add_openmw_dir (mwmp/processors/worldstate ProcessorRecordDynamic ProcessorWorldCollisionOverride ProcessorWorldMap
ProcessorWorldTime
add_openmw_dir (mwmp/processors/worldstate ProcessorCellCreate ProcessorRecordDynamic ProcessorWorldCollisionOverride
ProcessorWorldMap ProcessorWorldTime
)
# Main executable

@ -5,7 +5,6 @@
#include "player/ProcessorGUIMessageBox.hpp"
#include "player/ProcessorHandshake.hpp"
#include "player/ProcessorUserDisconnected.hpp"
#include "player/ProcessorCellCreate.hpp"
#include "player/ProcessorGameSettings.hpp"
#include "player/ProcessorGameWeather.hpp"
#include "player/ProcessorPlayerAnimFlags.hpp"
@ -89,6 +88,7 @@
#include "actor/ProcessorActorTest.hpp"
#include "WorldstateProcessor.hpp"
#include "worldstate/ProcessorCellCreate.hpp"
#include "worldstate/ProcessorRecordDynamic.hpp"
#include "worldstate/ProcessorWorldCollisionOverride.hpp"
#include "worldstate/ProcessorWorldMap.hpp"
@ -102,7 +102,6 @@ void ProcessorInitializer()
PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox());
PlayerProcessor::AddProcessor(new ProcessorHandshake());
PlayerProcessor::AddProcessor(new ProcessorUserDisconnected());
PlayerProcessor::AddProcessor(new ProcessorCellCreate());
PlayerProcessor::AddProcessor(new ProcessorGameSettings());
PlayerProcessor::AddProcessor(new ProcessorGameWeather());
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags());
@ -183,6 +182,7 @@ void ProcessorInitializer()
ActorProcessor::AddProcessor(new ProcessorActorStatsDynamic());
ActorProcessor::AddProcessor(new ProcessorActorTest());
WorldstateProcessor::AddProcessor(new ProcessorCellCreate());
WorldstateProcessor::AddProcessor(new ProcessorRecordDynamic());
WorldstateProcessor::AddProcessor(new ProcessorWorldCollisionOverride());
WorldstateProcessor::AddProcessor(new ProcessorWorldMap());

@ -1,11 +1,11 @@
#ifndef OPENMW_PROCESSORCELLCREATE_HPP
#define OPENMW_PROCESSORCELLCREATE_HPP
#include "../PlayerProcessor.hpp"
#include "../WorldstateProcessor.hpp"
namespace mwmp
{
class ProcessorCellCreate : public PlayerProcessor
class ProcessorCellCreate : public WorldstateProcessor
{
public:
ProcessorCellCreate()
@ -13,7 +13,7 @@ namespace mwmp
BPP_INIT(ID_CELL_CREATE)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
virtual void Do(WorldstatePacket &packet, Worldstate &worldstate)
{
// Placeholder
}

@ -178,8 +178,6 @@ add_component_dir (openmw-mp/Packets/Player
PacketHandshake PacketChatMessage PacketGUIBoxes PacketGameSettings PacketGameWeather
PacketCellCreate
PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay
PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty
PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass PacketPlayerDeath PacketPlayerEquipment
@ -203,7 +201,7 @@ add_component_dir (openmw-mp/Packets/Object
add_component_dir (openmw-mp/Packets/Worldstate
WorldstatePacket
PacketRecordDynamic PacketWorldCollisionOverride PacketWorldMap PacketWorldTime
PacketCellCreate PacketRecordDynamic PacketWorldCollisionOverride PacketWorldMap PacketWorldTime
)
add_component_dir (fallback

@ -4,7 +4,6 @@
#include "../Packets/Player/PacketHandshake.hpp"
#include "../Packets/Player/PacketGUIBoxes.hpp"
#include "../Packets/Player/PacketLoaded.hpp"
#include "../Packets/Player/PacketCellCreate.hpp"
#include "../Packets/Player/PacketGameSettings.hpp"
#include "../Packets/Player/PacketGameWeather.hpp"
#include "../Packets/Player/PacketPlayerActiveSkills.hpp"
@ -60,7 +59,6 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
AddPacket<PacketHandshake>(&packets, peer);
AddPacket<PacketGUIBoxes>(&packets, peer);
AddPacket<PacketLoaded>(&packets, peer);
AddPacket<PacketCellCreate>(&packets, peer);
AddPacket<PacketGameSettings>(&packets, peer);
AddPacket<PacketGameWeather>(&packets, peer);
AddPacket<PacketPlayerActiveSkills>(&packets, peer);

@ -1,3 +1,4 @@
#include "../Packets/Worldstate/PacketCellCreate.hpp"
#include "../Packets/Worldstate/PacketRecordDynamic.hpp"
#include "../Packets/Worldstate/PacketWorldCollisionOverride.hpp"
#include "../Packets/Worldstate/PacketWorldMap.hpp"
@ -15,6 +16,7 @@ inline void AddPacket(mwmp::WorldstatePacketController::packets_t *packets, RakN
mwmp::WorldstatePacketController::WorldstatePacketController(RakNet::RakPeerInterface *peer)
{
AddPacket<PacketCellCreate>(&packets, peer);
AddPacket<PacketRecordDynamic>(&packets, peer);
AddPacket<PacketWorldCollisionOverride>(&packets, peer);
AddPacket<PacketWorldMap>(&packets, peer);

@ -3,7 +3,7 @@
using namespace mwmp;
PacketCellCreate::PacketCellCreate(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
PacketCellCreate::PacketCellCreate(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer)
{
packetID = ID_CELL_CREATE;
orderChannel = CHANNEL_SYSTEM;
@ -11,7 +11,7 @@ PacketCellCreate::PacketCellCreate(RakNet::RakPeerInterface *peer) : PlayerPacke
void PacketCellCreate::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
WorldstatePacket::Packet(bs, send);
// Placeholder
}

@ -1,12 +1,12 @@
#ifndef OPENMW_PACKETCELLCREATE_HPP
#define OPENMW_PACKETCELLCREATE_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 PacketCellCreate: public PlayerPacket
class PacketCellCreate: public WorldstatePacket
{
public:
PacketCellCreate(RakNet::RakPeerInterface *peer);
Loading…
Cancel
Save