Particle emitters can be assigned to statuseffects, fixed item.Submarine not being set correctly for throwable items, flare particles + sounds, nerfed some of the medical items

This commit is contained in:
Regalis
2016-05-11 20:15:42 +03:00
parent a9ceaeb8ec
commit 6537751961
10 changed files with 67 additions and 18 deletions
@@ -241,22 +241,16 @@ namespace Barotrauma.Items.Components
public override void Update(float deltaTime, Camera cam)
{
if (item.body==null || !item.body.Enabled) return;
if (item.body == null || !item.body.Enabled) return;
if (!picker.HasSelectedItem(item)) IsActive = false;
ApplyStatusEffects(ActionType.OnActive, deltaTime, picker);
if (item.body.Dir != picker.AnimController.Dir) Flip(item);
AnimController ac = picker.AnimController;
item.Submarine = picker.Submarine;
//if (picker.SelectedConstruction != null && picker.SelectedConstruction.GetComponent<Controller>() != null) return;
//item.sprite.Depth = picker.AnimController.GetLimb(LimbType.RightHand).sprite.Depth + 0.01f;
ac.HoldItem(deltaTime, item, handlePos, holdPos, aimPos, picker.IsKeyDown(InputType.Aim), holdAngle);
picker.AnimController.HoldItem(deltaTime, item, handlePos, holdPos, aimPos, picker.IsKeyDown(InputType.Aim), holdAngle);
}
protected void Flip(Item item)
@@ -82,6 +82,8 @@ namespace Barotrauma.Items.Components
AnimController ac = picker.AnimController;
item.Submarine = picker.Submarine;
if (!throwing)
{
if (picker.IsKeyDown(InputType.Aim))