forked from teamnwah/openmw-tes3coop
[Client] Limit PlayerEquipment packets sent by recharging enchantments
This commit is contained in:
parent
715cac807d
commit
8c0b75d9f4
1 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <components/esm/esmwriter.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/journal.hpp"
|
||||
|
@ -476,9 +477,11 @@ void LocalPlayer::updateEquipment(bool forceUpdate)
|
|||
|
||||
if (it != invStore.end())
|
||||
{
|
||||
if (!::Misc::StringUtils::ciEqual(it->getCellRef().getRefId(), equipmentItems[slot].refId) ||
|
||||
it->getCellRef().getCharge() != item.charge ||
|
||||
it->getCellRef().getEnchantmentCharge() != item.enchantmentCharge ||
|
||||
MWWorld::CellRef &cellRef = it->getCellRef();
|
||||
|
||||
if (Misc::StringUtils::ciEqual(cellRef.getRefId(), item.refId) == false ||
|
||||
cellRef.getCharge() != item.charge ||
|
||||
Utils::compareFloats(cellRef.getEnchantmentCharge(), item.enchantmentCharge, 1.0f) == false ||
|
||||
it->getRefData().getCount() != item.count ||
|
||||
forceUpdate)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue