Item/statuseffect optimization:

- PowerTransfer components cache power connections instead of rechecking them every frame
- items store connections in a dictionary with the name of the connection as a key (-> finding the correct connection when sending a signal is more efficient)
- storing item tags & StatusEffect targetNames in HashSets
This commit is contained in:
Regalis
2016-11-08 21:14:29 +02:00
parent 1dc08b3019
commit 1617cd8f7a
4 changed files with 120 additions and 69 deletions
@@ -374,7 +374,7 @@ namespace Barotrauma.Items.Components
return;
}
List<ItemSound> matchingSounds = null;
List<ItemSound> matchingSounds;
if (!sounds.TryGetValue(type, out matchingSounds)) return;
ItemSound itemSound = null;