Wifi components can't communicate with the enemy sub in combat missions. Fixes #554
This commit is contained in:
@@ -14,6 +14,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private int channel;
|
||||
|
||||
public byte TeamID;
|
||||
|
||||
[Serialize(20000.0f, false)]
|
||||
public float Range
|
||||
{
|
||||
@@ -59,7 +61,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (!HasRequiredContainedItems(false)) return false;
|
||||
|
||||
if (sender == null || sender.channel != channel) return false;
|
||||
if (sender == null || sender.channel != channel || sender.TeamID != TeamID) return false;
|
||||
|
||||
return Vector2.Distance(item.WorldPosition, sender.item.WorldPosition) <= sender.Range;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user