diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 218d6e206..894416d08 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -226,9 +226,9 @@ void Networking::Update(RakNet::Packet *packet) break; } - case ID_GAME_UPDATE_EQUIPED: + case ID_GAME_EQUIPMENT: { - DEBUG_PRINTF("ID_GAME_UPDATE_EQUIPED\n"); + DEBUG_PRINTF("ID_GAME_EQUIPMENT\n"); myPacket->Read(player); myPacket->Send(player, true); @@ -365,7 +365,7 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid) controller->GetPacket(ID_GAME_DYNAMICSTATS_CURRENT)->RequestData(guid); controller->GetPacket(ID_GAME_UPDATE_POS)->RequestData(guid); controller->GetPacket(ID_GAME_CELL)->RequestData(guid); - controller->GetPacket(ID_GAME_UPDATE_EQUIPED)->RequestData(guid); + controller->GetPacket(ID_GAME_EQUIPMENT)->RequestData(guid); for (TPlayers::iterator pl = players->begin(); pl != players->end(); pl++) //sending other players to new player { @@ -377,7 +377,7 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid) controller->GetPacket(ID_GAME_SKILL)->Send(pl->second, guid); controller->GetPacket(ID_GAME_UPDATE_POS)->Send(pl->second, guid); controller->GetPacket(ID_GAME_CELL)->Send(pl->second, guid); - controller->GetPacket(ID_GAME_UPDATE_EQUIPED)->Send(pl->second, guid); + controller->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid); } } diff --git a/apps/openmw-mp/Script/Functions/Items.cpp b/apps/openmw-mp/Script/Functions/Items.cpp index 43f1d85d1..3338f3260 100644 --- a/apps/openmw-mp/Script/Functions/Items.cpp +++ b/apps/openmw-mp/Script/Functions/Items.cpp @@ -29,8 +29,8 @@ void ItemFunctions::EquipItem(unsigned short pid, unsigned short slot, const cha player->EquipedItem(slot)->refid = itemName; player->EquipedItem(slot)->count = count; - mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_UPDATE_EQUIPED)->Send(player, false); - mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_UPDATE_EQUIPED)->Send(player, true); + mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_EQUIPMENT)->Send(player, false); + mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_EQUIPMENT)->Send(player, true); } void ItemFunctions::UnequipItem(unsigned short pid, unsigned short slot) noexcept diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 839a16e71..a5ab4aa84 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -267,7 +267,7 @@ void LocalPlayer::updateInventory(bool forceUpdate) { RakNet::BitStream bs; bs.ResetWritePointer(); - GetNetworking()->GetPacket((RakNet::MessageID) ID_GAME_UPDATE_EQUIPED)->Packet(&bs, this, true); + GetNetworking()->GetPacket((RakNet::MessageID) ID_GAME_EQUIPMENT)->Packet(&bs, this, true); GetNetworking()->SendData(&bs); invChanged = false; } diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 4f6196a42..148283623 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -255,7 +255,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet) Players::DisconnectPlayer(id); } - case ID_GAME_UPDATE_EQUIPED: + case ID_GAME_EQUIPMENT: { if (id == myid) { diff --git a/apps/openmw/mwmp/Networking.hpp b/apps/openmw/mwmp/Networking.hpp index 506e0fdf6..969b61fd0 100644 --- a/apps/openmw/mwmp/Networking.hpp +++ b/apps/openmw/mwmp/Networking.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 33717b8d3..87c3f24ae 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -148,7 +148,7 @@ add_component_dir (version add_component_dir (openmw-mp Log PacketsController - Packets/BasePacket Packets/PacketBaseInfo Packets/PacketPosition Packets/PacketEquiped Packets/PacketAttack + Packets/BasePacket Packets/PacketBaseInfo Packets/PacketPosition Packets/PacketEquipment Packets/PacketAttack Packets/PacketDynamicStatsBase Packets/PacketDynamicStatsCurrent Packets/PacketCell Packets/PacketDrawState Packets/PacketChatMessage Packets/PacketCharGen Packets/PacketAttribute Packets/PacketSkill Packets/PacketLevel Packets/PacketHandshake Packets/PacketGUIBoxes Packets/PacketClass Packets/PacketTime) diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 1961006da..120e5990f 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -16,7 +16,7 @@ enum GameMessages ID_GAME_DYNAMICSTATS_CURRENT, ID_GAME_ATTACK, ID_USER_MYID, - ID_GAME_UPDATE_EQUIPED, + ID_GAME_EQUIPMENT, ID_USER_DISCONNECTED, ID_GAME_CREATE_PROJECTILE, ID_GAME_CAST, diff --git a/components/openmw-mp/Packets/PacketEquiped.cpp b/components/openmw-mp/Packets/PacketEquipment.cpp similarity index 57% rename from components/openmw-mp/Packets/PacketEquiped.cpp rename to components/openmw-mp/Packets/PacketEquipment.cpp index 96dfa97aa..8d3afdb38 100644 --- a/components/openmw-mp/Packets/PacketEquiped.cpp +++ b/components/openmw-mp/Packets/PacketEquipment.cpp @@ -2,17 +2,17 @@ // Created by koncord on 07.01.16. // -#include "PacketEquiped.hpp" +#include "PacketEquipment.hpp" #include using namespace mwmp; -PacketEquiped::PacketEquiped(RakNet::RakPeerInterface *peer) : BasePacket(peer) +PacketEquipment::PacketEquipment(RakNet::RakPeerInterface *peer) : BasePacket(peer) { - packetID = ID_GAME_UPDATE_EQUIPED; + packetID = ID_GAME_EQUIPMENT; } -void PacketEquiped::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) +void PacketEquipment::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) { BasePacket::Packet(bs, player, send); diff --git a/components/openmw-mp/Packets/PacketEquiped.hpp b/components/openmw-mp/Packets/PacketEquipment.hpp similarity index 76% rename from components/openmw-mp/Packets/PacketEquiped.hpp rename to components/openmw-mp/Packets/PacketEquipment.hpp index 309b84ffb..c33c0891d 100644 --- a/components/openmw-mp/Packets/PacketEquiped.hpp +++ b/components/openmw-mp/Packets/PacketEquipment.hpp @@ -9,10 +9,10 @@ namespace mwmp { - class PacketEquiped : public BasePacket + class PacketEquipment : public BasePacket { public: - PacketEquiped(RakNet::RakPeerInterface *peer); + PacketEquipment(RakNet::RakPeerInterface *peer); virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send); }; diff --git a/components/openmw-mp/PacketsController.cpp b/components/openmw-mp/PacketsController.cpp index bfeb02374..80f8cbce8 100644 --- a/components/openmw-mp/PacketsController.cpp +++ b/components/openmw-mp/PacketsController.cpp @@ -9,7 +9,7 @@ #include "Packets/PacketClass.hpp" #include "Packets/PacketPosition.hpp" #include "Packets/PacketBaseInfo.hpp" -#include "components/openmw-mp/Packets/PacketEquiped.hpp" +#include "components/openmw-mp/Packets/PacketEquipment.hpp" #include "Packets/PacketAttack.hpp" #include "Packets/PacketDynamicStatsBase.hpp" #include "Packets/PacketDynamicStatsCurrent.hpp" @@ -44,7 +44,7 @@ mwmp::PacketsController::PacketsController(RakNet::RakPeerInterface *peer) AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); - AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer);