From 81999a81797599b5e114c3c38978d6fd1f750197 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 2 Sep 2016 07:58:20 +0300 Subject: [PATCH] Remove outdated ID_GAME_UPDATE_SKILLS packet, part 2 --- apps/openmw/mwmp/Networking.cpp | 4 ++-- apps/openmw/mwmp/Networking.hpp | 1 - components/CMakeLists.txt | 8 ++++---- components/openmw-mp/Packets/PacketSkill.cpp | 1 - components/openmw-mp/PacketsController.cpp | 2 -- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 9c5266d79..e56d14f79 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -488,7 +488,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet) myPacket->Packet(&bsIn, __pl, false); - for (int i = 0; i < PacketAttributesAndStats::AttributesCount; ++i) + for (int i = 0; i < 8; ++i) { attributeValue.readState(__pl->CreatureStats()->mAttributes[i]); __pl_ptr.getClass().getCreatureStats(__pl_ptr).setAttribute(i, attributeValue); @@ -517,7 +517,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet) myPacket->Packet(&bsIn, __pl, false); - for (int i = 0; i < PacketAttributesAndStats::StatsCount; ++i) + for (int i = 0; i < 27; ++i) { skillValue.readState(__pl->NpcStats()->mSkills[i]); __pl_ptr.getClass().getNpcStats(__pl_ptr).setSkill(i, skillValue); diff --git a/apps/openmw/mwmp/Networking.hpp b/apps/openmw/mwmp/Networking.hpp index d69f31c8f..0eb97480a 100644 --- a/apps/openmw/mwmp/Networking.hpp +++ b/apps/openmw/mwmp/Networking.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index bb4f83fee..76b397c6c 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -148,10 +148,10 @@ add_component_dir (version add_component_dir (openmw-mp Log PacketsController - Packets/BasePacket Packets/PacketBaseInfo Packets/PacketPosition Packets/PacketEquiped Packets/PacketAttributesAndStats - Packets/PacketAttack Packets/PacketMainStats Packets/PacketCell Packets/PacketDrawState Packets/PacketChatMessage - Packets/PacketCharGen Packets/PacketAttribute Packets/PacketSkill Packets/PacketHandshake Packets/PacketGUIBoxes - Packets/PacketClass Packets/PacketTime) + Packets/BasePacket Packets/PacketBaseInfo Packets/PacketPosition Packets/PacketEquiped Packets/PacketAttack + Packets/PacketMainStats Packets/PacketCell Packets/PacketDrawState Packets/PacketChatMessage Packets/PacketCharGen + Packets/PacketAttribute Packets/PacketSkill Packets/PacketHandshake Packets/PacketGUIBoxes Packets/PacketClass + Packets/PacketTime) add_component_dir (fallback fallback validate diff --git a/components/openmw-mp/Packets/PacketSkill.cpp b/components/openmw-mp/Packets/PacketSkill.cpp index b2c5a5249..662f8294b 100644 --- a/components/openmw-mp/Packets/PacketSkill.cpp +++ b/components/openmw-mp/Packets/PacketSkill.cpp @@ -6,7 +6,6 @@ #include #include -#include "PacketAttributesAndStats.hpp" using namespace mwmp; diff --git a/components/openmw-mp/PacketsController.cpp b/components/openmw-mp/PacketsController.cpp index fa7fc5984..f0ff4a20b 100644 --- a/components/openmw-mp/PacketsController.cpp +++ b/components/openmw-mp/PacketsController.cpp @@ -10,7 +10,6 @@ #include "Packets/PacketPosition.hpp" #include "Packets/PacketBaseInfo.hpp" #include "components/openmw-mp/Packets/PacketEquiped.hpp" -#include "Packets/PacketAttributesAndStats.hpp" #include "Packets/PacketAttack.hpp" #include "Packets/PacketMainStats.hpp" #include "Packets/PacketResurrect.hpp" @@ -44,7 +43,6 @@ mwmp::PacketsController::PacketsController(RakNet::RakPeerInterface *peer) AddPacket(&packets, peer); AddPacket(&packets, peer); - AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer);