From e0f623fb8797e92c22fe4c191b8170ca25227acf Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 26 Aug 2019 15:39:56 +0300 Subject: [PATCH] [Client] Move check for preventing auto equipping to correct spot --- apps/openmw/mwworld/inventorystore.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index f3cdcb413..175f3710a 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -435,18 +435,6 @@ void MWWorld::InventoryStore::autoEquipWeapon (const MWWorld::Ptr& actor, TSlots void MWWorld::InventoryStore::autoEquipArmor (const MWWorld::Ptr& actor, TSlots& slots_) { - /* - Start of tes3mp addition - - We need DedicatedPlayers and DedicatedActors to wear exactly what they're wearing on their - authority client, so don't auto-equip for them - */ - if (mwmp::PlayerList::isDedicatedPlayer(actor) || mwmp::Main::get().getCellController()->isDedicatedActor(actor)) - return; - /* - End of tes3mp addition - */ - // Only NPCs can wear armor for now. // For creatures we equip only shields. if (!actor.getClass().isNpc()) @@ -590,6 +578,18 @@ void MWWorld::InventoryStore::autoEquipShield(const MWWorld::Ptr& actor, TSlots& void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor) { + /* + Start of tes3mp addition + + We need DedicatedPlayers and DedicatedActors to wear exactly what they're wearing on their + authority client, so don't auto-equip for them + */ + if (mwmp::PlayerList::isDedicatedPlayer(actor) || mwmp::Main::get().getCellController()->isDedicatedActor(actor)) + return; + /* + End of tes3mp addition + */ + TSlots slots_; initSlots (slots_);