diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 21a054fcc..226eb2c75 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -75,7 +75,7 @@ LocalPlayer::LocalPlayer() jailEndText = ""; isUsingBed = false; - isReceivingInventory = false; + avoidSendingInventoryPackets = false; isReceivingQuickKeys = false; isPlayingAnimation = false; diedSinceArrestAttempt = false; diff --git a/apps/openmw/mwmp/LocalPlayer.hpp b/apps/openmw/mwmp/LocalPlayer.hpp index 41a3e4114..3f01884c4 100644 --- a/apps/openmw/mwmp/LocalPlayer.hpp +++ b/apps/openmw/mwmp/LocalPlayer.hpp @@ -19,7 +19,7 @@ namespace mwmp bool receivedCharacter; bool isUsingBed; - bool isReceivingInventory; + bool avoidSendingInventoryPackets; bool isReceivingQuickKeys; bool isPlayingAnimation; bool diedSinceArrestAttempt; diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp index 5d4599fdf..4ce29b87d 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp @@ -28,7 +28,7 @@ namespace mwmp // Because we send PlayerInventory packets from the same OpenMW methods that we use to set the // items received, we need to set a boolean to prevent resending the items set here - localPlayer.isReceivingInventory = true; + localPlayer.avoidSendingInventoryPackets = true; if (inventoryAction == InventoryChanges::ADD) localPlayer.addItems(); @@ -37,7 +37,7 @@ namespace mwmp else // InventoryChanges::SET localPlayer.setInventory(); - localPlayer.isReceivingInventory = false; + localPlayer.avoidSendingInventoryPackets = false; } } }; diff --git a/apps/openmw/mwworld/containerstore.cpp b/apps/openmw/mwworld/containerstore.cpp index 613a1dd16..7d29ae913 100644 --- a/apps/openmw/mwworld/containerstore.cpp +++ b/apps/openmw/mwworld/containerstore.cpp @@ -212,7 +212,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::unstack(const Ptr &ptr, { mwmp::LocalPlayer *localPlayer = mwmp::Main::get().getLocalPlayer(); - if (!localPlayer->isReceivingInventory) + if (!localPlayer->avoidSendingInventoryPackets) localPlayer->sendItemChange(ptr, ptr.getRefData().getCount() - count, mwmp::InventoryChanges::ADD); } /* @@ -315,7 +315,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr { mwmp::LocalPlayer *localPlayer = mwmp::Main::get().getLocalPlayer(); - if (!localPlayer->isReceivingInventory) + if (!localPlayer->avoidSendingInventoryPackets) { int realCount = count; @@ -540,7 +540,7 @@ int MWWorld::ContainerStore::remove(const Ptr& item, int count, const Ptr& actor { mwmp::LocalPlayer *localPlayer = mwmp::Main::get().getLocalPlayer(); - if (!localPlayer->isReceivingInventory) + if (!localPlayer->avoidSendingInventoryPackets) localPlayer->sendItemChange(item, count, mwmp::InventoryChanges::REMOVE); } /*