(5670a7c58) Don't get stuck if cannot use the button.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:44:48 +03:00
parent 96b2d953d2
commit f8090d470e
87 changed files with 1711 additions and 2564 deletions
@@ -43,11 +43,6 @@ namespace Barotrauma.Items.Components
set { userPos = value; }
}
public Character User
{
get { return user; }
}
public Controller(Item item, XElement element)
: base(item, element)
{
@@ -168,7 +163,7 @@ namespace Barotrauma.Items.Components
return false;
}
item.SendSignal(0, "1", "trigger_out", user);
item.SendSignal(0, "1", "trigger_out", character);
ApplyStatusEffects(ActionType.OnUse, 1.0f, activator);
@@ -238,7 +233,7 @@ namespace Barotrauma.Items.Components
private Item GetFocusTarget()
{
item.SendSignal(0, MathHelper.ToDegrees(targetRotation).ToString("G", CultureInfo.InvariantCulture), "position_out", user);
item.SendSignal(0, MathHelper.ToDegrees(targetRotation).ToString("G", CultureInfo.InvariantCulture), "position_out", character);
for (int i = item.LastSentSignalRecipients.Count - 1; i >= 0; i--)
{