(aea5053bf) Fix wall target position not updated when the submarine moves. Fix latchontoai attach positions and distance checks. Detaching should also work both when the characters can get in and when the submarine velocity is enough to detach the characters. Still not synced, but re-enabled for testing.
This commit is contained in:
@@ -241,30 +241,20 @@ namespace Barotrauma.Networking
|
||||
FileSize = fileSize
|
||||
};
|
||||
|
||||
int maxRetries = 4;
|
||||
for (int i = 0; i <= maxRetries; i++)
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
newTransfer.OpenStream();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
if (i < maxRetries)
|
||||
{
|
||||
DebugConsole.NewMessage("Failed to initiate a file transfer {" + e.Message + "}, retrying in 250 ms...", Color.Red);
|
||||
Thread.Sleep(250);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.NewMessage("Failed to initiate a file transfer {" + e.Message + "}", Color.Red);
|
||||
GameMain.Client.CancelFileTransfer(inc.SequenceChannel);
|
||||
newTransfer.Status = FileTransferStatus.Error;
|
||||
OnTransferFailed(newTransfer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
newTransfer.OpenStream();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
GameMain.Client.CancelFileTransfer(inc.SequenceChannel);
|
||||
DebugConsole.NewMessage("Failed to initiate a file transfer {" + e.Message + "}", Color.Red);
|
||||
|
||||
newTransfer.Status = FileTransferStatus.Error;
|
||||
OnTransferFailed(newTransfer);
|
||||
return;
|
||||
}
|
||||
|
||||
activeTransfers.Add(newTransfer);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user