[General] Turn GameWeather into WorldWeather, now a WorldstatePacket

pull/471/head
David Cernat 7 years ago
parent 646111d998
commit 0b5cb15f71

@ -98,22 +98,21 @@ source_group(tes3mp-server\\processors\\actor FILES ${PROCESSORS_ACTOR})
set(PROCESSORS_PLAYER
processors/player/ProcessorChatMsg.hpp processors/player/ProcessorGUIMessageBox.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/ProcessorPlayerInput.hpp
processors/player/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerJournal.hpp
processors/player/ProcessorWorldKillCount.hpp processors/player/ProcessorPlayerLevel.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/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/ProcessorPlayerInput.hpp processors/player/ProcessorPlayerInventory.hpp
processors/player/ProcessorPlayerJournal.hpp processors/player/ProcessorWorldKillCount.hpp
processors/player/ProcessorPlayerLevel.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})
@ -136,6 +135,7 @@ source_group(tes3mp-server\\processors\\object FILES ${PROCESSORS_OBJECT})
set(PROCESSORS_WORLDSTATE
processors/worldstate/ProcessorRecordDynamic.hpp processors/worldstate/ProcessorWorldMap.hpp
processors/worldstate/ProcessorWorldWeather.hpp
)
source_group(tes3mp-server\\processors\\worldstate FILES ${PROCESSORS_WORLDSTATE})

@ -6,7 +6,6 @@
#include "PlayerProcessor.hpp"
#include "player/ProcessorChatMsg.hpp"
#include "player/ProcessorGUIMessageBox.hpp"
#include "player/ProcessorGameWeather.hpp"
#include "player/ProcessorPlayerCharGen.hpp"
#include "player/ProcessorPlayerAnimFlags.hpp"
#include "player/ProcessorPlayerAnimPlay.hpp"
@ -77,6 +76,7 @@
#include "WorldstateProcessor.hpp"
#include "worldstate/ProcessorRecordDynamic.hpp"
#include "worldstate/ProcessorWorldMap.hpp"
#include "worldstate/ProcessorWorldWeather.hpp"
using namespace mwmp;
@ -84,7 +84,6 @@ void ProcessorInitializer()
{
PlayerProcessor::AddProcessor(new ProcessorChatMsg());
PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox());
PlayerProcessor::AddProcessor(new ProcessorGameWeather());
PlayerProcessor::AddProcessor(new ProcessorPlayerCharGen());
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags());
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimPlay());
@ -155,4 +154,5 @@ void ProcessorInitializer()
WorldstateProcessor::AddProcessor(new ProcessorRecordDynamic());
WorldstateProcessor::AddProcessor(new ProcessorWorldMap());
WorldstateProcessor::AddProcessor(new ProcessorWorldWeather());
}

@ -0,0 +1,23 @@
#ifndef OPENMW_PROCESSORWORLDWEATHER_HPP
#define OPENMW_PROCESSORWORLDWEATHER_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorWorldWeather : public WorldstateProcessor
{
public:
ProcessorWorldWeather()
{
BPP_INIT(ID_WORLD_WEATHER)
}
void Do(WorldstatePacket &packet, Player &player, BaseWorldstate &worldstate) override
{
// Placeholder to be filled in later
}
};
}
#endif //OPENMW_PROCESSORWORLDWEATHER_HPP

@ -112,12 +112,12 @@ add_openmw_dir (mwmp/processors/actor ProcessorActorAI ProcessorActorAnimFlags P
)
add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageBox ProcessorHandshake
ProcessorUserDisconnected ProcessorUserMyID ProcessorGameSettings ProcessorGameWeather ProcessorPlayerAnimFlags
ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBaseInfo ProcessorPlayerBehavior
ProcessorPlayerBook ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass
ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction
ProcessorPlayerInput ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorWorldKillCount
ProcessorPlayerLevel ProcessorPlayerMiscellaneous ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys
ProcessorUserDisconnected ProcessorUserMyID ProcessorGameSettings ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay
ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBaseInfo ProcessorPlayerBehavior ProcessorPlayerBook
ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen
ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInput
ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorWorldKillCount ProcessorPlayerLevel
ProcessorPlayerMiscellaneous ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys
ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech
ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic
)
@ -135,7 +135,7 @@ add_openmw_dir (mwmp/processors/object BaseObjectProcessor
)
add_openmw_dir (mwmp/processors/worldstate ProcessorCellCreate ProcessorCellReplace ProcessorRecordDynamic
ProcessorWorldCollisionOverride ProcessorWorldMap ProcessorWorldTime
ProcessorWorldCollisionOverride ProcessorWorldMap ProcessorWorldTime ProcessorWorldWeather
)
# Main executable

@ -6,7 +6,6 @@
#include "player/ProcessorHandshake.hpp"
#include "player/ProcessorUserDisconnected.hpp"
#include "player/ProcessorGameSettings.hpp"
#include "player/ProcessorGameWeather.hpp"
#include "player/ProcessorPlayerAnimFlags.hpp"
#include "player/ProcessorPlayerAnimPlay.hpp"
#include "player/ProcessorPlayerAttack.hpp"
@ -95,6 +94,7 @@
#include "worldstate/ProcessorWorldCollisionOverride.hpp"
#include "worldstate/ProcessorWorldMap.hpp"
#include "worldstate/ProcessorWorldTime.hpp"
#include "worldstate/ProcessorWorldWeather.hpp"
using namespace mwmp;
@ -105,7 +105,6 @@ void ProcessorInitializer()
PlayerProcessor::AddProcessor(new ProcessorHandshake());
PlayerProcessor::AddProcessor(new ProcessorUserDisconnected());
PlayerProcessor::AddProcessor(new ProcessorGameSettings());
PlayerProcessor::AddProcessor(new ProcessorGameWeather());
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags());
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimPlay());
PlayerProcessor::AddProcessor(new ProcessorPlayerAttack());
@ -191,4 +190,5 @@ void ProcessorInitializer()
WorldstateProcessor::AddProcessor(new ProcessorWorldCollisionOverride());
WorldstateProcessor::AddProcessor(new ProcessorWorldMap());
WorldstateProcessor::AddProcessor(new ProcessorWorldTime());
WorldstateProcessor::AddProcessor(new ProcessorWorldWeather());
}

@ -1,23 +0,0 @@
#ifndef OPENMW_PROCESSORGAMEWEATHER_HPP
#define OPENMW_PROCESSORGAMEWEATHER_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorGameWeather : public PlayerProcessor
{
public:
ProcessorGameWeather()
{
BPP_INIT(ID_GAME_WEATHER)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
// Placeholder to be filled in later
}
};
}
#endif //OPENMW_PROCESSORGAMEWEATHER_HPP

@ -5,15 +5,15 @@
namespace mwmp
{
class ProcessorGameWeather : public PlayerProcessor
class ProcessorWorldWeather : public WorldstateProcessor
{
public:
ProcessorGameWeather()
ProcessorWorldWeather()
{
BPP_INIT(ID_GAME_WEATHER)
BPP_INIT(ID_WORLD_WEATHER)
}
void Do(PlayerPacket &packet, Player &player) override
virtual void Do(WorldstatePacket &packet, Worldstate &worldstate)
{
// Placeholder to be filled in later
}

@ -176,7 +176,7 @@ add_component_dir (openmw-mp/Packets/Actor
add_component_dir (openmw-mp/Packets/Player
PlayerPacket
PacketHandshake PacketChatMessage PacketGUIBoxes PacketGameSettings PacketGameWeather
PacketHandshake PacketChatMessage PacketGUIBoxes PacketGameSettings
PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay
PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty
@ -203,7 +203,7 @@ add_component_dir (openmw-mp/Packets/Worldstate
WorldstatePacket
PacketCellCreate PacketCellReplace PacketRecordDynamic PacketWorldCollisionOverride PacketWorldMap
PacketWorldTime
PacketWorldTime PacketWorldWeather
)
add_component_dir (fallback

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

@ -4,6 +4,7 @@
#include "../Packets/Worldstate/PacketWorldCollisionOverride.hpp"
#include "../Packets/Worldstate/PacketWorldMap.hpp"
#include "../Packets/Worldstate/PacketWorldTime.hpp"
#include "../Packets/Worldstate/PacketWorldWeather.hpp"
#include "WorldstatePacketController.hpp"
@ -23,6 +24,7 @@ mwmp::WorldstatePacketController::WorldstatePacketController(RakNet::RakPeerInte
AddPacket<PacketWorldCollisionOverride>(&packets, peer);
AddPacket<PacketWorldMap>(&packets, peer);
AddPacket<PacketWorldTime>(&packets, peer);
AddPacket<PacketWorldWeather>(&packets, peer);
}

@ -17,8 +17,6 @@ enum GameMessages
ID_HANDSHAKE,
ID_LOADED,
ID_GUI_MESSAGEBOX,
ID_GAME_WEATHER,
ID_PLAYER_BASEINFO,
ID_PLAYER_BEHAVIOR,
@ -111,6 +109,7 @@ enum GameMessages
ID_WORLD_COLLISION_OVERRIDE,
ID_WORLD_MAP,
ID_WORLD_TIME,
ID_WORLD_WEATHER
};
enum OrderingChannel

@ -1,17 +0,0 @@
#include "PacketGameWeather.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketGameWeather::PacketGameWeather(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_GAME_WEATHER;
orderChannel = CHANNEL_SYSTEM;
}
void PacketGameWeather::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
// Placeholder to be filled in later
}

@ -1,17 +0,0 @@
#ifndef OPENMW_PACKETGAMEWEATHER_HPP
#define OPENMW_PACKETGAMEWEATHER_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
namespace mwmp
{
class PacketGameWeather : public PlayerPacket
{
public:
PacketGameWeather(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, bool send);
};
}
#endif //OPENMW_PACKETGAMEWEATHER_HPP

@ -0,0 +1,17 @@
#include "PacketWorldWeather.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketWorldWeather::PacketWorldWeather(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer)
{
packetID = ID_WORLD_WEATHER;
orderChannel = CHANNEL_WORLDSTATE;
}
void PacketWorldWeather::Packet(RakNet::BitStream *bs, bool send)
{
WorldstatePacket::Packet(bs, send);
// Placeholder to be filled in later
}

@ -0,0 +1,17 @@
#ifndef OPENMW_PACKETWORLDWEATHER_HPP
#define OPENMW_PACKETWORLDWEATHER_HPP
#include <components/openmw-mp/Packets/Worldstate/WorldstatePacket.hpp>
namespace mwmp
{
class PacketWorldWeather : public WorldstatePacket
{
public:
PacketWorldWeather(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, bool send);
};
}
#endif //OPENMW_PACKETWORLDWEATHER_HPP
Loading…
Cancel
Save