Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
@@ -231,17 +231,22 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
var should = GameMain.LuaCs.Hook.Call<bool?>("wifiSignalTransmitted", this, signal, sentFromChat);
|
||||
|
||||
if (should != null && should.Value)
|
||||
return;
|
||||
|
||||
if (sentFromChat)
|
||||
{
|
||||
item.LastSentSignalRecipients.Clear();
|
||||
}
|
||||
if (should != null && should.Value) { return; }
|
||||
|
||||
bool chatMsgSent = false;
|
||||
|
||||
var receivers = GetReceiversInRange();
|
||||
if (sentFromChat)
|
||||
{
|
||||
//if sent from chat, we need to reset the "signal chain" at this point
|
||||
//so we can correctly detect which components the signal has already passed through to avoid infinite loops
|
||||
//only relevant for signals originating from the chat - normally this is handled in Item.SendSignal
|
||||
item.LastSentSignalRecipients.Clear();
|
||||
foreach (WifiComponent receiver in receivers)
|
||||
{
|
||||
receiver.item.LastSentSignalRecipients.Clear();
|
||||
}
|
||||
}
|
||||
foreach (WifiComponent wifiComp in receivers)
|
||||
{
|
||||
if (sentFromChat && !wifiComp.LinkToChat) { continue; }
|
||||
|
||||
Reference in New Issue
Block a user