- ItemContainers whose bodies are disabled don't set the positions of the contained items each frame (only once when the item is placed in the container)

- ItemContainers maintain a list of statuseffects that need to be applied on the contained items instead of constantly rechecking each item
- deactivating ItemContainers if they have no body and there are no statuseffects to apply
This commit is contained in:
Regalis
2016-11-08 21:22:09 +02:00
parent 1617cd8f7a
commit adf19869c2
3 changed files with 71 additions and 37 deletions
@@ -168,9 +168,8 @@ namespace Barotrauma.Items.Components
public override void Update(float deltaTime, Camera cam)
{
base.Update(deltaTime, cam);
item.SetTransform(picker.SimPosition, 0.0f);
item.SetContainedItemPositions();
ApplyStatusEffects(ActionType.OnWearing, deltaTime, picker);