(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:
@@ -219,6 +219,7 @@ namespace Barotrauma.Items.Components
|
||||
requiredSkills = new List<Skill>();
|
||||
|
||||
#if CLIENT
|
||||
hasSoundsOfType = new bool[Enum.GetValues(typeof(ActionType)).Length];
|
||||
sounds = new Dictionary<ActionType, List<ItemSound>>();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user