From 311ce4119d10e6777f453227450641e08ee394a3 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 26 May 2017 22:53:28 +0300 Subject: [PATCH] [General] Fix logic issues related to ActorEquipment --- apps/openmw/mwmp/LocalActor.cpp | 1 + .../openmw-mp/Packets/Actor/PacketActorEquipment.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwmp/LocalActor.cpp b/apps/openmw/mwmp/LocalActor.cpp index b2c5e4ca4..1376b1c5b 100644 --- a/apps/openmw/mwmp/LocalActor.cpp +++ b/apps/openmw/mwmp/LocalActor.cpp @@ -242,6 +242,7 @@ void LocalActor::updateEquipment(bool forceUpdate) if (equipmentChanged) { mwmp::Main::get().getNetworking()->getActorList()->addEquipmentActor(*this); + equipmentChanged = false; } } diff --git a/components/openmw-mp/Packets/Actor/PacketActorEquipment.cpp b/components/openmw-mp/Packets/Actor/PacketActorEquipment.cpp index 456428404..b999f5eb4 100644 --- a/components/openmw-mp/Packets/Actor/PacketActorEquipment.cpp +++ b/components/openmw-mp/Packets/Actor/PacketActorEquipment.cpp @@ -38,11 +38,11 @@ void PacketActorEquipment::Packet(RakNet::BitStream *bs, bool send) RW(actor.refNumIndex, send); RW(actor.mpNum, send); - for (int i = 0; i < 19; i++) + for (int j = 0; j < 19; j++) { - RW(actor.equipedItems[i].refId, send); - RW(actor.equipedItems[i].count, send); - RW(actor.equipedItems[i].charge, send); + RW(actor.equipedItems[j].refId, send); + RW(actor.equipedItems[j].count, send); + RW(actor.equipedItems[j].charge, send); } if (!send)