(eba811de) Unstable 0.9.703.0
This commit is contained in:
@@ -176,8 +176,16 @@ namespace Barotrauma.Networking
|
||||
byte[] lengthBytes = new byte[2];
|
||||
lengthBytes[0] = (byte)(msg.Length & 0xFF);
|
||||
lengthBytes[1] = (byte)((msg.Length >> 8) & 0xFF);
|
||||
writeStream?.Write(lengthBytes, 0, 2);
|
||||
writeStream?.Write(msg, 0, msg.Length);
|
||||
try
|
||||
{
|
||||
writeStream?.Write(lengthBytes, 0, 2);
|
||||
writeStream?.Write(msg, 0, msg.Length);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
shutDown = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (shutDown) { break; }
|
||||
|
||||
|
||||
@@ -74,6 +74,17 @@ namespace Barotrauma.Networking
|
||||
RespawnShuttle.Load(false);
|
||||
RespawnShuttle.PhysicsBody.FarseerBody.OnCollision += OnShuttleCollision;
|
||||
|
||||
//prevent wifi components from communicating between the respawn shuttle and other subs
|
||||
List<WifiComponent> wifiComponents = new List<WifiComponent>();
|
||||
foreach (Item item in Item.ItemList)
|
||||
{
|
||||
if (item.Submarine == RespawnShuttle) { wifiComponents.AddRange(item.GetComponents<WifiComponent>()); }
|
||||
}
|
||||
foreach (WifiComponent wifiComponent in wifiComponents)
|
||||
{
|
||||
wifiComponent.TeamID = Character.TeamType.FriendlyNPC;
|
||||
}
|
||||
|
||||
ResetShuttle();
|
||||
|
||||
shuttleDoors = new List<Door>();
|
||||
|
||||
Reference in New Issue
Block a user