mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 09:36:43 +00:00
[Client] Ignore equipment items for DedicatedActors with count below 0
This commit is contained in:
parent
e3bc11d9eb
commit
6b75a82777
1 changed files with 5 additions and 2 deletions
|
@ -168,6 +168,11 @@ void DedicatedActor::setEquipment()
|
||||||
|
|
||||||
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot)
|
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot)
|
||||||
{
|
{
|
||||||
|
int count = equipedItems[slot].count;
|
||||||
|
|
||||||
|
// If we've somehow received a corrupted item with a count lower than 0, ignore it
|
||||||
|
if (count < 0) continue;
|
||||||
|
|
||||||
MWWorld::ContainerStoreIterator it = invStore.getSlot(slot);
|
MWWorld::ContainerStoreIterator it = invStore.getSlot(slot);
|
||||||
|
|
||||||
const string &packetRefId = equipedItems[slot].refId;
|
const string &packetRefId = equipedItems[slot].refId;
|
||||||
|
@ -188,8 +193,6 @@ void DedicatedActor::setEquipment()
|
||||||
if (packetRefId.empty() || equal)
|
if (packetRefId.empty() || equal)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int count = equipedItems[slot].count;
|
|
||||||
|
|
||||||
if (hasItem(packetRefId, packetCharge))
|
if (hasItem(packetRefId, packetCharge))
|
||||||
equipItem(packetRefId, packetCharge);
|
equipItem(packetRefId, packetCharge);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue