mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 20:36:41 +00:00
[Client] Use clearer boolean name for checks regarding inventory sending
This commit is contained in:
parent
e78503d5f3
commit
31c0f5c976
4 changed files with 7 additions and 7 deletions
|
@ -75,7 +75,7 @@ LocalPlayer::LocalPlayer()
|
|||
jailEndText = "";
|
||||
|
||||
isUsingBed = false;
|
||||
isReceivingInventory = false;
|
||||
avoidSendingInventoryPackets = false;
|
||||
isReceivingQuickKeys = false;
|
||||
isPlayingAnimation = false;
|
||||
diedSinceArrestAttempt = false;
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace mwmp
|
|||
bool receivedCharacter;
|
||||
|
||||
bool isUsingBed;
|
||||
bool isReceivingInventory;
|
||||
bool avoidSendingInventoryPackets;
|
||||
bool isReceivingQuickKeys;
|
||||
bool isPlayingAnimation;
|
||||
bool diedSinceArrestAttempt;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue