diff --git a/apps/openmw-mp/Script/Functions/Worldstate.cpp b/apps/openmw-mp/Script/Functions/Worldstate.cpp index 0460e3915..d8ee3d589 100644 --- a/apps/openmw-mp/Script/Functions/Worldstate.cpp +++ b/apps/openmw-mp/Script/Functions/Worldstate.cpp @@ -23,8 +23,8 @@ void WorldstateFunctions::SetHour(unsigned short pid, double hour) noexcept writeWorldstate.month = -1; writeWorldstate.day = -1; - mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME)->setWorldstate(&writeWorldstate); - mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME)->Send(false); + mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_WORLD_TIME)->setWorldstate(&writeWorldstate); + mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_WORLD_TIME)->Send(false); } void WorldstateFunctions::SetMonth(unsigned short pid, int month) noexcept @@ -38,8 +38,8 @@ void WorldstateFunctions::SetMonth(unsigned short pid, int month) noexcept writeWorldstate.month = month; writeWorldstate.day = -1; - mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME)->setWorldstate(&writeWorldstate); - mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME)->Send(false); + mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_WORLD_TIME)->setWorldstate(&writeWorldstate); + mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_WORLD_TIME)->Send(false); } @@ -54,6 +54,6 @@ void WorldstateFunctions::SetDay(unsigned short pid, int day) noexcept writeWorldstate.month = -1; writeWorldstate.day = day; - mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME)->setWorldstate(&writeWorldstate); - mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME)->Send(false); + mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_WORLD_TIME)->setWorldstate(&writeWorldstate); + mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_WORLD_TIME)->Send(false); } diff --git a/apps/openmw-mp/Script/Functions/Worldstate.hpp b/apps/openmw-mp/Script/Functions/Worldstate.hpp index 5a1f6ee8a..1078a38f8 100644 --- a/apps/openmw-mp/Script/Functions/Worldstate.hpp +++ b/apps/openmw-mp/Script/Functions/Worldstate.hpp @@ -13,7 +13,7 @@ class WorldstateFunctions public: /** - * \brief Set the game hour for a player and send a GameTime packet to that player. + * \brief Set the game hour for a player and send a WorldTime packet to that player. * * \param pid The player ID. * \param hour The hour. @@ -22,7 +22,7 @@ public: static void SetHour(unsigned short pid, double hour) noexcept; /** - * \brief Set the game month for a player and send a GameTime packet to that player. + * \brief Set the game month for a player and send a WorldTime packet to that player. * * \param pid The player ID. * \param month The month. @@ -31,7 +31,7 @@ public: static void SetMonth(unsigned short pid, int month) noexcept; /** - * \brief Set the game day for a player and send a GameTime packet to that player. + * \brief Set the game day for a player and send a WorldTime packet to that player. * * \param pid The player ID. * \param day The day. diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index ddea2b435..3d9b13cdf 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -133,7 +133,7 @@ add_openmw_dir (mwmp/processors/object BaseObjectProcessor ProcessorConsoleComma ProcessorScriptMemberFloat ProcessorScriptGlobalShort ProcessorScriptGlobalFloat ) -add_openmw_dir (mwmp/processors/worldstate ProcessorGameTime +add_openmw_dir (mwmp/processors/worldstate ProcessorWorldTime ) # Main executable diff --git a/apps/openmw/mwmp/processors/ProcessorInitializer.cpp b/apps/openmw/mwmp/processors/ProcessorInitializer.cpp index 95d32842e..5e4e8f5d6 100644 --- a/apps/openmw/mwmp/processors/ProcessorInitializer.cpp +++ b/apps/openmw/mwmp/processors/ProcessorInitializer.cpp @@ -91,7 +91,7 @@ #include "actor/ProcessorActorTest.hpp" #include "WorldstateProcessor.hpp" -#include "worldstate/ProcessorGameTime.hpp" +#include "worldstate/ProcessorWorldTime.hpp" using namespace mwmp; @@ -184,5 +184,5 @@ void ProcessorInitializer() ActorProcessor::AddProcessor(new ProcessorActorStatsDynamic()); ActorProcessor::AddProcessor(new ProcessorActorTest()); - WorldstateProcessor::AddProcessor(new ProcessorGameTime()); + WorldstateProcessor::AddProcessor(new ProcessorWorldTime()); } diff --git a/apps/openmw/mwmp/processors/worldstate/ProcessorGameTime.hpp b/apps/openmw/mwmp/processors/worldstate/ProcessorWorldTime.hpp similarity index 75% rename from apps/openmw/mwmp/processors/worldstate/ProcessorGameTime.hpp rename to apps/openmw/mwmp/processors/worldstate/ProcessorWorldTime.hpp index ce0180536..965674e92 100644 --- a/apps/openmw/mwmp/processors/worldstate/ProcessorGameTime.hpp +++ b/apps/openmw/mwmp/processors/worldstate/ProcessorWorldTime.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_PROCESSORGAMETIME_HPP -#define OPENMW_PROCESSORGAMETIME_HPP +#ifndef OPENMW_PROCESSORWORLDTIME_HPP +#define OPENMW_PROCESSORWORLDTIME_HPP #include @@ -8,12 +8,12 @@ namespace mwmp { - class ProcessorGameTime : public WorldstateProcessor + class ProcessorWorldTime : public WorldstateProcessor { public: - ProcessorGameTime() + ProcessorWorldTime() { - BPP_INIT(ID_GAME_TIME) + BPP_INIT(ID_WORLD_TIME) } virtual void Do(WorldstatePacket &packet, BaseWorldstate &worldstate) @@ -34,4 +34,4 @@ namespace mwmp -#endif //OPENMW_PROCESSORGAMETIME_HPP +#endif //OPENMW_PROCESSORWORLDTIME_HPP diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 6f6bfcc1f..7bf2535fc 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -198,7 +198,7 @@ add_component_dir (openmw-mp/Packets/Object add_component_dir (openmw-mp/Packets/Worldstate WorldstatePacket - PacketGameTime + PacketWorldTime ) add_component_dir (fallback diff --git a/components/openmw-mp/Controllers/WorldstatePacketController.cpp b/components/openmw-mp/Controllers/WorldstatePacketController.cpp index 667d29b08..d9d575119 100644 --- a/components/openmw-mp/Controllers/WorldstatePacketController.cpp +++ b/components/openmw-mp/Controllers/WorldstatePacketController.cpp @@ -1,4 +1,4 @@ -#include "../Packets/Worldstate/PacketGameTime.hpp" +#include "../Packets/Worldstate/PacketWorldTime.hpp" #include "WorldstatePacketController.hpp" @@ -12,7 +12,7 @@ inline void AddPacket(mwmp::WorldstatePacketController::packets_t *packets, RakN mwmp::WorldstatePacketController::WorldstatePacketController(RakNet::RakPeerInterface *peer) { - AddPacket(&packets, peer); + AddPacket(&packets, peer); } diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 7bf23145b..143553a7f 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -18,7 +18,7 @@ enum GameMessages ID_LOADED, ID_GUI_MESSAGEBOX, - ID_GAME_TIME, + ID_WORLD_TIME, ID_GAME_WEATHER, ID_PLAYER_BASEINFO, diff --git a/components/openmw-mp/Packets/Worldstate/PacketGameTime.hpp b/components/openmw-mp/Packets/Worldstate/PacketGameTime.hpp deleted file mode 100644 index e081e1d0c..000000000 --- a/components/openmw-mp/Packets/Worldstate/PacketGameTime.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENMW_PACKETGAMETIME_HPP -#define OPENMW_PACKETGAMETIME_HPP - -#include - -namespace mwmp -{ - class PacketGameTime : public WorldstatePacket - { - public: - PacketGameTime(RakNet::RakPeerInterface *peer); - - virtual void Packet(RakNet::BitStream *bs, bool send); - }; -} - -#endif //OPENMW_PACKETGAMETIME_HPP diff --git a/components/openmw-mp/Packets/Worldstate/PacketGameTime.cpp b/components/openmw-mp/Packets/Worldstate/PacketWorldTime.cpp similarity index 54% rename from components/openmw-mp/Packets/Worldstate/PacketGameTime.cpp rename to components/openmw-mp/Packets/Worldstate/PacketWorldTime.cpp index 8c1ff7ffc..af270be62 100644 --- a/components/openmw-mp/Packets/Worldstate/PacketGameTime.cpp +++ b/components/openmw-mp/Packets/Worldstate/PacketWorldTime.cpp @@ -1,15 +1,15 @@ -#include "PacketGameTime.hpp" +#include "PacketWorldTime.hpp" #include using namespace mwmp; -PacketGameTime::PacketGameTime(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer) +PacketWorldTime::PacketWorldTime(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer) { - packetID = ID_GAME_TIME; + packetID = ID_WORLD_TIME; orderChannel = CHANNEL_SYSTEM; } -void PacketGameTime::Packet(RakNet::BitStream *bs, bool send) +void PacketWorldTime::Packet(RakNet::BitStream *bs, bool send) { WorldstatePacket::Packet(bs, send); diff --git a/components/openmw-mp/Packets/Worldstate/PacketWorldTime.hpp b/components/openmw-mp/Packets/Worldstate/PacketWorldTime.hpp new file mode 100644 index 000000000..5a9e93723 --- /dev/null +++ b/components/openmw-mp/Packets/Worldstate/PacketWorldTime.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETWORLDTIME_HPP +#define OPENMW_PACKETWORLDTIME_HPP + +#include + +namespace mwmp +{ + class PacketWorldTime : public WorldstatePacket + { + public: + PacketWorldTime(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETWORLDTIME_HPP