diff --git a/apps/openmw-mp/CMakeLists.txt b/apps/openmw-mp/CMakeLists.txt index 3968b1f37..174b85137 100644 --- a/apps/openmw-mp/CMakeLists.txt +++ b/apps/openmw-mp/CMakeLists.txt @@ -118,7 +118,7 @@ set(PROCESSORS_PLAYER processors/player/ProcessorPlayerCharClass.hpp processors/player/ProcessorPlayerCharGen.hpp processors/player/ProcessorPlayerDeath.hpp processors/player/ProcessorPlayerEquipment.hpp processors/player/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerJournal.hpp - processors/player/ProcessorPlayerLevel.hpp processors/player/ProcessorPlayerPos.hpp + processors/player/ProcessorPlayerLevel.hpp processors/player/ProcessorPlayerPosition.hpp processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerSkill.hpp processors/player/ProcessorPlayerSpellbook.hpp processors/player/ProcessorPlayerStatsDynamic.hpp ) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 8d934b9e1..5db9508e0 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -242,7 +242,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) { playerPacketController->GetPacket(ID_PLAYER_BASEINFO)->RequestData(guid); playerPacketController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->RequestData(guid); - playerPacketController->GetPacket(ID_PLAYER_POS)->RequestData(guid); + playerPacketController->GetPacket(ID_PLAYER_POSITION)->RequestData(guid); playerPacketController->GetPacket(ID_PLAYER_CELL_CHANGE)->RequestData(guid); playerPacketController->GetPacket(ID_PLAYER_EQUIPMENT)->RequestData(guid); @@ -266,7 +266,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) playerPacketController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_ATTRIBUTE)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_SKILL)->setPlayer(pl->second); - playerPacketController->GetPacket(ID_PLAYER_POS)->setPlayer(pl->second); + playerPacketController->GetPacket(ID_PLAYER_POSITION)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_CELL_CHANGE)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_EQUIPMENT)->setPlayer(pl->second); @@ -274,7 +274,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) playerPacketController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(guid); playerPacketController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(guid); playerPacketController->GetPacket(ID_PLAYER_SKILL)->Send(guid); - playerPacketController->GetPacket(ID_PLAYER_POS)->Send(guid); + playerPacketController->GetPacket(ID_PLAYER_POSITION)->Send(guid); playerPacketController->GetPacket(ID_PLAYER_CELL_CHANGE)->Send(guid); playerPacketController->GetPacket(ID_PLAYER_EQUIPMENT)->Send(guid); } diff --git a/apps/openmw-mp/ProcessorInitializer.cpp b/apps/openmw-mp/ProcessorInitializer.cpp index b48040bf1..d817eb2ab 100644 --- a/apps/openmw-mp/ProcessorInitializer.cpp +++ b/apps/openmw-mp/ProcessorInitializer.cpp @@ -5,7 +5,7 @@ #include "ProcessorInitializer.hpp" #include "PlayerProcessor.hpp" -#include "processors/player/ProcessorPlayerPos.hpp" +#include "processors/player/ProcessorPlayerPosition.hpp" #include "processors/player/ProcessorPlayerCellChange.hpp" #include "processors/player/ProcessorPlayerCellState.hpp" #include "processors/player/ProcessorPlayerAttribute.hpp" @@ -59,7 +59,7 @@ using namespace mwmp; void ProcessorInitializer() { - PlayerProcessor::AddProcessor(new ProcessorPlayerPos()); + PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellChange()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellState()); PlayerProcessor::AddProcessor(new ProcessorPlayerAttribute()); diff --git a/apps/openmw-mp/Script/Functions/Positions.cpp b/apps/openmw-mp/Script/Functions/Positions.cpp index 36e135acf..753d48753 100644 --- a/apps/openmw-mp/Script/Functions/Positions.cpp +++ b/apps/openmw-mp/Script/Functions/Positions.cpp @@ -109,6 +109,6 @@ void PositionFunctions::SendPos(unsigned short pid) noexcept Player *player; GET_PLAYER(pid, player, ); - mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_POS)->setPlayer(player); - mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_POS)->Send(false); + mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_POSITION)->setPlayer(player); + mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_POSITION)->Send(false); } diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp index 52cdd0df4..4ae16f0a9 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp @@ -43,14 +43,14 @@ namespace mwmp playerController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(other); playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->setPlayer(other); - playerController->GetPacket(ID_PLAYER_POS)->setPlayer(other); + playerController->GetPacket(ID_PLAYER_POSITION)->setPlayer(other); playerController->GetPacket(ID_PLAYER_SKILL)->setPlayer(other); playerController->GetPacket(ID_PLAYER_EQUIPMENT)->setPlayer(other); playerController->GetPacket(ID_PLAYER_ANIM_FLAGS)->setPlayer(other); playerController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(pl->guid); - playerController->GetPacket(ID_PLAYER_POS)->Send(pl->guid); + playerController->GetPacket(ID_PLAYER_POSITION)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_SKILL)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_EQUIPMENT)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_ANIM_FLAGS)->Send(pl->guid); @@ -71,8 +71,8 @@ namespace mwmp } }); - playerController->GetPacket(ID_PLAYER_POS)->setPlayer(&player); - playerController->GetPacket(ID_PLAYER_POS)->Send(); + playerController->GetPacket(ID_PLAYER_POSITION)->setPlayer(&player); + playerController->GetPacket(ID_PLAYER_POSITION)->Send(); packet.setPlayer(&player); packet.Send(true); //send to other clients diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerPos.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerPosition.hpp similarity index 60% rename from apps/openmw-mp/processors/player/ProcessorPlayerPos.hpp rename to apps/openmw-mp/processors/player/ProcessorPlayerPosition.hpp index a941735e4..1ce5c982c 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerPos.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerPosition.hpp @@ -2,19 +2,19 @@ // Created by koncord on 31.03.17. // -#ifndef OPENMW_PROCESSORPLAYERPOS_HPP -#define OPENMW_PROCESSORPLAYERPOS_HPP +#ifndef OPENMW_PROCESSORPLAYERPOSITION_HPP +#define OPENMW_PROCESSORPLAYERPOSITION_HPP #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp { - class ProcessorPlayerPos : public PlayerProcessor + class ProcessorPlayerPosition : public PlayerProcessor { public: - ProcessorPlayerPos() + ProcessorPlayerPosition() { - BPP_INIT(ID_PLAYER_POS) + BPP_INIT(ID_PLAYER_POSITION) } void Do(PlayerPacket &packet, Player &player) override @@ -28,4 +28,4 @@ namespace mwmp }; } -#endif //OPENMW_PROCESSORPLAYERPOS_HPP +#endif //OPENMW_PROCESSORPLAYERPOSITION_HPP diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index d6149c6a2..4f4b5197f 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -109,7 +109,7 @@ add_openmw_dir (mwmp\\processors\\player ProcessorChatMessage ProcessorGameConso ProcessorHandshake ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBaseInfo ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerAnimFlags ProcessorPlayerStatsDynamic ProcessorPlayerEquipment ProcessorPlayerInventory - ProcessorPlayerJournal ProcessorPlayerLevel ProcessorPlayerPos ProcessorPlayerResurrect ProcessorPlayerSkill + ProcessorPlayerJournal ProcessorPlayerLevel ProcessorPlayerPosition ProcessorPlayerResurrect ProcessorPlayerSkill ProcessorPlayerSpellbook ProcessorUserDisconnected ProcessorUserMyID ) diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 4ca9ff937..dc5420452 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -327,8 +327,8 @@ void LocalPlayer::updatePosition(bool forceUpdate) direction.pos[1] = move.mPosition[1]; direction.pos[2] = move.mPosition[2]; - getNetworking()->getPlayerPacket(ID_PLAYER_POS)->setPlayer(this); - getNetworking()->getPlayerPacket(ID_PLAYER_POS)->Send(); + getNetworking()->getPlayerPacket(ID_PLAYER_POSITION)->setPlayer(this); + getNetworking()->getPlayerPacket(ID_PLAYER_POSITION)->Send(); } else if (isJumping && world->isOnGround(player)) { @@ -340,8 +340,8 @@ void LocalPlayer::updatePosition(bool forceUpdate) { sentJumpEnd = true; position = ptrPos; - getNetworking()->getPlayerPacket(ID_PLAYER_POS)->setPlayer(this); - getNetworking()->getPlayerPacket(ID_PLAYER_POS)->Send(); + getNetworking()->getPlayerPacket(ID_PLAYER_POSITION)->setPlayer(this); + getNetworking()->getPlayerPacket(ID_PLAYER_POSITION)->Send(); } } diff --git a/apps/openmw/mwmp/ProcessorInitializer.cpp b/apps/openmw/mwmp/ProcessorInitializer.cpp index be92abdab..ec81d0177 100644 --- a/apps/openmw/mwmp/ProcessorInitializer.cpp +++ b/apps/openmw/mwmp/ProcessorInitializer.cpp @@ -5,7 +5,7 @@ #include "ProcessorInitializer.hpp" #include "PlayerProcessor.hpp" -#include "processors/player/ProcessorPlayerPos.hpp" +#include "processors/player/ProcessorPlayerPosition.hpp" #include "processors/player/ProcessorPlayerCellChange.hpp" #include "processors/player/ProcessorPlayerCellState.hpp" #include "processors/player/ProcessorPlayerAttribute.hpp" @@ -63,7 +63,7 @@ using namespace mwmp; void ProcessorInitializer() { - PlayerProcessor::AddProcessor(new ProcessorPlayerPos()); + PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellChange()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellState()); PlayerProcessor::AddProcessor(new ProcessorPlayerAttribute()); diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerPos.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerPosition.hpp similarity index 71% rename from apps/openmw/mwmp/processors/player/ProcessorPlayerPos.hpp rename to apps/openmw/mwmp/processors/player/ProcessorPlayerPosition.hpp index c55068993..59b3c3aa0 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerPos.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerPosition.hpp @@ -2,20 +2,20 @@ // Created by koncord on 16.04.17. // -#ifndef OPENMW_PROCESSORPLAYERPOS_HPP -#define OPENMW_PROCESSORPLAYERPOS_HPP +#ifndef OPENMW_PROCESSORPLAYERPOSITION_HPP +#define OPENMW_PROCESSORPLAYERPOSITION_HPP #include "apps/openmw/mwmp/PlayerProcessor.hpp" namespace mwmp { - class ProcessorPlayerPos : public PlayerProcessor + class ProcessorPlayerPosition : public PlayerProcessor { public: - ProcessorPlayerPos() + ProcessorPlayerPosition() { - BPP_INIT(ID_PLAYER_POS) + BPP_INIT(ID_PLAYER_POSITION) } virtual void Do(PlayerPacket &packet, BasePlayer *player) @@ -24,7 +24,7 @@ namespace mwmp { if (!isRequest()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "ID_PLAYER_POS changed by server"); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "ID_PLAYER_POSITION changed by server"); static_cast(player)->setPosition(); } @@ -38,4 +38,4 @@ namespace mwmp } -#endif //OPENMW_PROCESSORPLAYERPOS_HPP +#endif //OPENMW_PROCESSORPLAYERPOSITION_HPP diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 51c5d9920..f24098efe 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -12,7 +12,7 @@ enum GameMessages _ID_UNUSED = ID_USER_PACKET_ENUM+1, ID_PLAYER_BASEINFO, ID_PLAYER_CHARGEN, - ID_PLAYER_POS, + ID_PLAYER_POSITION, ID_PLAYER_STATS_DYNAMIC, ID_PLAYER_ATTACK, ID_USER_MYID, diff --git a/components/openmw-mp/Packets/Player/PacketPlayerPosition.cpp b/components/openmw-mp/Packets/Player/PacketPlayerPosition.cpp index 344ffd3cb..5752ec1e8 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerPosition.cpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerPosition.cpp @@ -10,7 +10,7 @@ using namespace mwmp; PacketPlayerPosition::PacketPlayerPosition(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { - packetID = ID_PLAYER_POS; + packetID = ID_PLAYER_POSITION; priority = MEDIUM_PRIORITY; //reliability = UNRELIABLE_SEQUENCED; }