(7e43eae73) Optimized Item.ApplyStatusEffects & ItemComponent.PlaySound: check if the item has effects/sounds of the correct type from a bool array instead of doing a dictionary lookup. A small thing, but the methods are called so frequently that it adds up to a lot.

This commit is contained in:
Joonas Rikkonen
2019-04-18 12:05:11 +03:00
parent 1a3184dbad
commit b0580a9050
5 changed files with 57 additions and 21 deletions
@@ -133,6 +133,7 @@ namespace Barotrauma.Items.Components
set
{
if (base.IsActive == value) { return; }
base.IsActive = value;
#if CLIENT
if (light == null) return;