1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-28 07:39:40 +00:00

[Client] Move check for preventing auto equipping to correct spot

This commit is contained in:
David Cernat 2019-08-26 15:39:56 +03:00
parent e15428e139
commit e0f623fb87

View file

@ -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_);