Controllers don't have to be wired directly to an item for camera focus to work (= railguns and cameras can be used over wifi). Closes #535
This commit is contained in:
@@ -160,6 +160,11 @@ namespace Barotrauma.Items.Components
|
||||
if (recipient == null) continue;
|
||||
if (recipient.item == this.item || recipient.item == source) continue;
|
||||
|
||||
if (source != null && !source.LastSentSignalRecipients.Contains(recipient.item))
|
||||
{
|
||||
source.LastSentSignalRecipients.Add(recipient.item);
|
||||
}
|
||||
|
||||
foreach (ItemComponent ic in recipient.item.components)
|
||||
{
|
||||
ic.ReceiveSignal(stepsTaken, signal, recipient, item, sender, power);
|
||||
|
||||
@@ -95,6 +95,16 @@ namespace Barotrauma.Items.Components
|
||||
foreach (WifiComponent wifiComp in receivers)
|
||||
{
|
||||
wifiComp.item.SendSignal(stepsTaken, signal, "signal_out", sender);
|
||||
if (source != null)
|
||||
{
|
||||
foreach (Item receiverItem in wifiComp.item.LastSentSignalRecipients)
|
||||
{
|
||||
if (!source.LastSentSignalRecipients.Contains(receiverItem))
|
||||
{
|
||||
source.LastSentSignalRecipients.Add(receiverItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user