diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 26efa0a99..e1030c4a4 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -964,7 +964,7 @@ namespace MWMechanics Start of tes3mp change (major) We need DedicatedPlayers and DedicatedActors to not automatically - equip their light-emitting items, so additions conditions have been + equip their light-emitting items, so additional conditions have been added for them */ if (!isPlayer && !mwmp::PlayerList::isDedicatedPlayer(ptr) && !mwmp::Main::get().getCellController()->isDedicatedActor(ptr)) diff --git a/apps/openmw/mwmp/LocalActor.cpp b/apps/openmw/mwmp/LocalActor.cpp index 7c4143517..ac474776e 100644 --- a/apps/openmw/mwmp/LocalActor.cpp +++ b/apps/openmw/mwmp/LocalActor.cpp @@ -193,8 +193,8 @@ void LocalActor::updateEquipment(bool forceUpdate) MWWorld::InventoryStore &invStore = ptr.getClass().getInventoryStore(ptr); for (int slot = 0; slot < MWWorld::InventoryStore::Slots; slot++) { - MWWorld::ContainerStoreIterator it = invStore.getSlot(slot); auto &item = equipedItems[slot]; + MWWorld::ContainerStoreIterator it = invStore.getSlot(slot); if (it != invStore.end()) { @@ -205,16 +205,8 @@ void LocalActor::updateEquipment(bool forceUpdate) item.refId = cellRef.getRefId(); item.charge = cellRef.getCharge(); - if (slot == MWWorld::InventoryStore::Slot_CarriedRight) - { - MWMechanics::WeaponType weaptype; - auto &_class = ptr.getClass(); - MWMechanics::getActiveWeapon(_class.getCreatureStats(ptr), _class.getInventoryStore(ptr), &weaptype); - if (weaptype != MWMechanics::WeapType_Thrown) - item.count = 1; - } - else - item.count = invStore.count(cellRef.getRefId()); + item.enchantmentCharge = it->getCellRef().getEnchantmentCharge(); + item.count = it->getRefData().getCount(); } } else if (!item.refId.empty()) @@ -223,6 +215,7 @@ void LocalActor::updateEquipment(bool forceUpdate) item.refId = ""; item.count = 0; item.charge = 0; + item.enchantmentCharge = -1; } } diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index c70b2e499..28439a773 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -471,17 +471,7 @@ void LocalPlayer::updateEquipment(bool forceUpdate) item.refId = it->getCellRef().getRefId(); item.charge = it->getCellRef().getCharge(); item.enchantmentCharge = it->getCellRef().getEnchantmentCharge(); - - if (slot == MWWorld::InventoryStore::Slot_CarriedRight) - { - MWMechanics::WeaponType weaptype; - MWMechanics::getActiveWeapon(ptrPlayer.getClass().getCreatureStats(ptrPlayer), - ptrPlayer.getClass().getInventoryStore(ptrPlayer), &weaptype); - if (weaptype != MWMechanics::WeapType_Thrown) - item.count = 1; - } - else - item.count = invStore.count(it->getCellRef().getRefId()); + item.count = it->getRefData().getCount(); } } else if (!item.refId.empty())