Skip to content

Commit

Permalink
tweak: dont broadcast default outfit
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed Mar 29, 2024
1 parent 5602e81 commit 4a3cbf4
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Code/client/Services/Generic/InventoryService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,8 @@ void InventoryService::OnNotifyEquipmentChanges(const NotifyEquipmentChanges& ac
// TODO: should this be done for armor as well?
// Also, find out why the client is sending two equip messages in the first place.
// TODO: this fix makes it so that weapons and spells are sometimes invisible :/
#if 0
if (!acMessage.Unequip && pActor->GetEquippedWeapon(slotId) == pItem)
return;
#endif
#endif

auto* pEquipManager = EquipManager::Get();
Expand Down Expand Up @@ -331,15 +329,12 @@ void InventoryService::RunNakedNPCBugChecks() noexcept
if (!pActor->ShouldWearBodyPiece())
continue;

// Don't broadcast changes if a remote actor needs fixing
if (pActor->GetExtension()->IsRemote())
{
ScopedEquipOverride seo;
ScopedInventoryOverride sio;
pActor->ResetInventory(false);
}
else
pActor->ResetInventory(false);
// Don't broadcast changes, it'll just make things messier.
// If all clients have this problem, they'll all fix it individually.
ScopedEquipOverride seo;
ScopedInventoryOverride sio;

pActor->ResetInventory(false);
}
#endif
}

0 comments on commit 4a3cbf4

Please sign in to comment.